]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
ae534967bd0f641a6c79b4865cb70b26613fc86a
[Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                 </fields>
98                 <links>
99                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
100                 </links>
101         </class>
102
103         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
104                 <fields>
105                         <field name="id" oils_persist:virtual="true" />
106                         <field name="children" oils_persist:virtual="true" />
107                         <field name="owner_doc" oils_persist:virtual="true" />
108                         <field name="intra_doc_id" oils_persist:virtual="true" />
109                         <field name="parent_node" oils_persist:virtual="true" />
110                         <field name="node_type" oils_persist:virtual="true" />
111                         <field name="namespace_uri" oils_persist:virtual="true" />
112                         <field name="name" oils_persist:virtual="true" />
113                         <field name="value" oils_persist:virtual="true" />
114                 </fields>
115         </class>
116
117         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
118                 <fields>
119                         <field name="title" oils_persist:virtual="true" />
120                         <field name="author" oils_persist:virtual="true" />
121                         <field name="doc_id" oils_persist:virtual="true" />
122                         <field name="doc_type" oils_persist:virtual="true" />
123                         <field name="pubdate" oils_persist:virtual="true" />
124                         <field name="isbn" oils_persist:virtual="true" />
125                         <field name="publisher" oils_persist:virtual="true" />
126                         <field name="tcn" oils_persist:virtual="true" />
127                         <field name="subject" oils_persist:virtual="true" />
128                         <field name="types_of_resource" oils_persist:virtual="true" />
129                         <field name="call_numbers" oils_persist:virtual="true" />
130                         <field name="edition" oils_persist:virtual="true" />
131                         <field name="online_loc" oils_persist:virtual="true" />
132                         <field name="synopsis" oils_persist:virtual="true" />
133                         <field name="physical_description" oils_persist:virtual="true" />
134                         <field name="toc" oils_persist:virtual="true" />
135                         <field name="copy_count" oils_persist:virtual="true" />
136                         <field name="series" oils_persist:virtual="true" />
137                         <field name="serials" oils_persist:virtual="true" />
138                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
139                 </fields>
140         </class>
141
142         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
143                 <fields>
144                         <field name="err_msg" oils_persist:virtual="true" />
145                         <field name="type" oils_persist:virtual="true" />
146                 </fields>
147         </class>
148
149         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
150                 <fields>
151                         <field name="err_msg" oils_persist:virtual="true" />
152                         <field name="type" oils_persist:virtual="true" />
153                 </fields>
154         </class>
155
156         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
157                 <fields oils_persist:primary="matchpoint">
158                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
159                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
160                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
164                 </links>
165         </class>
166
167         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
168         <!-- when the time is right, turn me into a view.  -->
169                 <fields>
170             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
171             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
172             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
173             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
174             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
175             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
176             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
179             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
180                 </fields>
181         </class>
182
183         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
184                 <fields>
185                         <field name="public_name" oils_persist:virtual="true" />
186                         <field name="target_url" oils_persist:virtual="true" />
187                         <field name="target_coverage" oils_persist:virtual="true" />
188                         <field name="target_embargo" oils_persist:virtual="true" />
189                 </fields>
190         </class>
191
192         <!-- Actually in the DB -->
193         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
194                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
195                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
196                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
197                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
198                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
199                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
200                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
201                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
202                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
203                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
204                 </fields>
205                 <links>
206                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
207                 </links>
208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
209                         <actions>
210                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
211                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
212                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
213                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
214                         </actions>
215                 </permacrud>
216         </class>
217
218         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
219                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
220                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
221                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
222                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
223                 </fields>
224                 <links>
225                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
226                 </links>
227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
228                         <actions>
229                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
230                     <context link="grp" field="owner"/>
231                 </create>
232                                 <retrieve/>
233                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
234                     <context link="grp" field="owner"/>
235                 </update>
236                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
237                     <context link="grp" field="owner"/>
238                 </delete>
239                         </actions>
240                 </permacrud>
241         </class>
242
243         <class  id="rrbs" 
244             controller="open-ils.cstore open-ils.pcrud" 
245             oils_obj:fieldmapper="rating::record_badge_score" 
246             oils_persist:tablename="rating.record_badge_score" 
247             reporter:label="Statistical Popularity Badge">
248                 <fields oils_persist:primary="id" 
249                 oils_persist:sequence="rating.record_badge_score_id_seq">
250                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
251                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
252                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
253                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
254                 </fields>
255         <links>
256             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
257             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
258         </links>
259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
260                         <actions>
261                                 <retrieve/>
262                         </actions>
263                 </permacrud>
264         </class>
265
266         <class  id="rp" 
267             controller="open-ils.cstore open-ils.pcrud" 
268             oils_obj:fieldmapper="rating::popularity_parameter" 
269             oils_persist:tablename="rating.popularity_parameter" 
270             reporter:label="Statistical Popularity Parameter">
271                 <fields oils_persist:primary="id" 
272                 oils_persist:sequence="rating.popularity_parameter_id_seq">
273                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
274                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
275                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
276                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
277                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
278                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
279                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
280                 </fields>
281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
282                         <actions>
283                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
284                                 <retrieve/>
285                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
286                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
287                         </actions>
288                 </permacrud>
289         </class>
290
291         <class  id="rb" 
292             controller="open-ils.cstore open-ils.pcrud" 
293             oils_obj:fieldmapper="rating::badge" 
294             oils_persist:tablename="rating.badge" 
295             reporter:label="Statistical Popularity Badge">
296                 <fields oils_persist:primary="id" 
297                 oils_persist:sequence="rating.badge_id_seq">
298                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
299                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
301                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
302                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
303                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
304                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
305                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
306                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
307                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
308                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
309                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
310                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
311                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
312                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
313                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
314                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
315                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
316                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
317                 </fields>
318                 <links>
319                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
320                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
321                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
322                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
323                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
324                 </links>
325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
326                         <actions>
327                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
328                                 <retrieve/>
329                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
330                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
331                         </actions>
332                 </permacrud>
333         </class>
334
335         <class  id="vibtg" 
336             controller="open-ils.cstore open-ils.pcrud" 
337             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
338             oils_persist:tablename="vandelay.import_bib_trash_group" 
339             reporter:label="Import/Overlay Field Groups for Removal">
340                 <fields oils_persist:primary="id" 
341                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
342                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
343                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
344                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
345                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
346                 </fields>
347                 <links>
348                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
349                 </links>
350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
351                         <actions>
352                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
353                                 <retrieve/>
354                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
355                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                         </actions>
357                 </permacrud>
358         </class>
359
360
361         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
362                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
363                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
364                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
365                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
366                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
367                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
368                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
369                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
370                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
371                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
372                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
373                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
374                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
375                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
376                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
377                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
378                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
379                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
380                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
381                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
382                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
383                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
384                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
385                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
386                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
387                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
388                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
389                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
390                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
391                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
392                 </fields>
393                 <links>
394                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
395                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
396                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <create permission="CREATE_IMPORT_ITEM">
402                     <context link="definition" field="owner"/>
403                                 </create>
404                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
405                     <context link="definition" field="owner"/>
406                                 </retrieve>
407                                 <update permission="UPDATE_IMPORT_ITEM">
408                     <context link="definition" field="owner"/>
409                                 </update>
410                                 <delete permission="DELETE_IMPORT_ITEM">
411                     <context link="definition" field="owner"/>
412                                 </delete>
413                         </actions>
414                 </permacrud>
415         </class>
416
417         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
418                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
419                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
420                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
421                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
422                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
423                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
424                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
425                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
426                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
427                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
428                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
429                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
430                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
431                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
432                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
433                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
434                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
435                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
436                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
437                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
438                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
439                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
440                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
441                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
442                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
443                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
444                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
445                 </fields>
446                 <links>
447                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
448                 </links>
449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
450                         <actions>
451                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
452                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
453                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
454                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                         </actions>
456                 </permacrud>
457         </class>
458
459         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
460                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
461                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
462                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
463                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
464                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
465                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
466                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
467                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
468                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
469                 </fields>
470                 <links>
471                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
472                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
473                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
474                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
475                 </links>
476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
477                         <actions>
478                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
479                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
480                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
481                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
482                         </actions>
483                 </permacrud>
484         </class>
485
486         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
487                 <fields oils_persist:primary="code">
488                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
489                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
490                 </fields>
491                 <links>
492                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
493                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
494                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
495                 </links>
496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
497                         <actions>
498                                 <retrieve/>
499                         </actions>
500                 </permacrud>
501         </class>
502
503         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
504                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
505                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
506                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
507                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
508                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
509                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
510                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
511                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
512                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
513                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
514                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
515                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
516                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
517                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
518                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
519                 </fields>
520                 <links>
521                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
522                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
523                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
524                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
525             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
526             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
527             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
528                 </links>
529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
530                         <actions>
531                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
532                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
533                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
534                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
535                         </actions>
536                 </permacrud>
537         </class>
538
539         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
540                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
541                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
542                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
543                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
544                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
545                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
546                 </fields>
547                 <links/>
548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
549                         <actions>
550                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
551                 <retrieve/>
552                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
553                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
554                         </actions>
555                 </permacrud>
556         </class>
557
558         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
559                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
560                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
561                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
562                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
563                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
564                 </fields>
565                 <links>
566                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
567                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
568                 </links>
569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
570                         <actions>
571                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
572                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
573                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
574                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
575                         </actions>
576                 </permacrud>
577         </class>
578
579         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
580                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
581                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
582                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
583                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
584                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
585                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
586                 </fields>
587                 <links>
588                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
589                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
590                 </links>
591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
592                         <actions>
593                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
594                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
595                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
596                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
597                         </actions>
598                 </permacrud>
599         </class>
600
601         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
602                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
603                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
604                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
605                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
606                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
607                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
608                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
609                 </fields>
610                 <links>
611                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
612                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
613                 </links>
614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
615                         <actions>
616                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                         </actions>
621                 </permacrud>
622         </class>
623
624         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
625                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
626                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
627                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
628                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
629                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
630                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
631                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
632                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
633                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
634                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
635                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
636                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
637                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
638                 </fields>
639                 <links>
640                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
641                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
642                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
643             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
644             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
645                 </links>
646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
647                         <actions>
648                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
649                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
650                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
651                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                         </actions>
653                 </permacrud>
654         </class>
655
656         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
657                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
658                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
659                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
660                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
661                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
662                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
663                 </fields>
664                 <links/>
665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
666                         <actions>
667                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
668                 <retrieve/>
669                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
670                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                         </actions>
672                 </permacrud>
673         </class>
674
675         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
676                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
677                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
678                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
679                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
680                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
681                 </fields>
682                 <links>
683                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
684                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
685                 </links>
686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687                         <actions>
688                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
689                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
690                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
691                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                         </actions>
693                 </permacrud>
694         </class>
695
696         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
697                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
698                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
699                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
700                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
701                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
702                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
703                 </fields>
704                 <links>
705                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
706                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
707                 </links>
708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
709                         <actions>
710                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
711                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
712                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
713                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                         </actions>
715                 </permacrud>
716         </class>
717
718         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
719                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
720                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
721                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
722                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
723                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
724                 </fields>
725                 <links>
726                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
727                 </links>
728                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
729                         <actions>
730                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
731                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
732                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
733                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                         </actions>
735                 </permacrud>
736         </class>
737
738         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
739                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
740                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
741                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
742                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
743                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
744                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
745                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
746                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
747             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
748                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
749                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
750                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
751                 </fields>
752                 <links>
753                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
754                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
755                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
756                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
757                 </links>
758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
759                         <actions>
760                                 <create permission="ADMIN_IMPORT_MATCH_SET">
761                     <context link="match_set" field="owner"/>
762                                 </create>
763                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
764                     <context link="match_set" field="owner"/>
765                                 </retrieve>
766                                 <update permission="ADMIN_IMPORT_MATCH_SET">
767                     <context link="match_set" field="owner"/>
768                                 </update>
769                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
770                     <context link="match_set" field="owner"/>
771                                 </delete>
772                         </actions>
773                 </permacrud>
774         </class>
775
776         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
777                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
778                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
779                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
780                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
781                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
782                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
783                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
784                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
785                 </fields>
786                 <links>
787                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
788                 </links>
789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
790                         <actions>
791                                 <create permission="ADMIN_IMPORT_MATCH_SET">
792                     <context link="match_set" field="owner"/>
793                                 </create>
794                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
795                     <context link="match_set" field="owner"/>
796                                 </retrieve>
797                                 <update permission="ADMIN_IMPORT_MATCH_SET">
798                     <context link="match_set" field="owner"/>
799                                 </update>
800                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
801                     <context link="match_set" field="owner"/>
802                                 </delete>
803                         </actions>
804                 </permacrud>
805         </class>
806
807         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
808                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
809                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
810                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
811                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
812                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
813                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
814                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
815                 </fields>
816                 <links>
817                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
818                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
819                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
820                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
821                 </links>
822         </class>
823
824     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
825         <fields oils_persist:primary="name">
826             <field reporter:label="Name" name="name" reporter:datatype="text"/>
827             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
828             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
829             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
830         </fields>
831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
832             <actions>
833                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
834                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
835                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
836                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
837             </actions>
838         </permacrud>
839     </class>
840
841     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
842         <fields oils_persist:primary="id">
843             <field reporter:label="ID" name="id" reporter:datatype="id"/>
844             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
845             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
846             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
847             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
848         </fields>
849         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
850             <actions>
851                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
852                 <retrieve/>
853                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
854                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
855             </actions>
856         </permacrud>
857     </class>
858
859         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
860                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
861                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
862                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
863                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
864                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
865                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
866                 </fields>
867                 <links>
868                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
869                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
870                 </links>
871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
872             <actions>
873                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
874                 <retrieve/>
875                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
876                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
877             </actions>
878         </permacrud>
879         </class>
880
881         <class id="cmrcfmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_format" oils_persist:tablename="config.marc_format" reporter:label="MARC Formats" oils_persist:field_safe="true">
882                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
883                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
884                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
885                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
886         </fields>
887         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
888             <actions>
889                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
890                 <retrieve/>
891                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
892                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
893             </actions>
894         </permacrud>
895         </class>
896
897         <class id="cmrcfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_field" oils_persist:tablename="config.marc_field" reporter:label="MARC Fields" oils_persist:field_safe="true">
898                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
899                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
900                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
901                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
902                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
903                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
904                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
905                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
906                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
907                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
908                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
909                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
910         </fields>
911                 <links>
912                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
913                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
914         </links>
915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
916             <actions>
917                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
918                 <retrieve/>
919                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
920                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
921             </actions>
922         </permacrud>
923         </class>
924
925         <class id="cmrcsubfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_subfield" oils_persist:tablename="config.marc_subfield" reporter:label="MARC Subfields" oils_persist:subfield_safe="true">
926                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
927                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
928                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
929                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
930                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
931                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
932                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
933                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
934                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
935                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
936                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
937         </fields>
938                 <links>
939                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
940                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
941         </links>
942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
943             <actions>
944                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
945                 <retrieve/>
946                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
947                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
948             </actions>
949         </permacrud>
950         </class>
951
952         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
953                 <fields oils_persist:primary="name">
954                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
955                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
956                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
957                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
958                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
959                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
960                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
961                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
962                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
963                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
964                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
965                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
966                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
967                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
968                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
969                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
970                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
971                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
972                 </fields>
973                 <links>
974                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
975                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
976                 </links>
977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
978             <actions>
979                 <create permission="ADMIN_SVF" global_required="true"/>
980                 <retrieve/>
981                 <update permission="ADMIN_SVF" global_required="true"/>
982                 <delete permission="ADMIN_SVF" global_required="true"/>
983             </actions>
984         </permacrud>
985         </class>
986
987         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
988                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
989                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
990                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
991                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
992             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
993                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
994                 </fields>
995                 <links/>
996         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
997             <actions>
998                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
999                 <retrieve/>
1000                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1001                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1002             </actions>
1003         </permacrud>
1004         </class>
1005
1006         <class id="ccraed" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::composite_attr_entry_definition" oils_persist:tablename="config.composite_attr_entry_definition" reporter:label="Composite Attribute Definitions" oils_persist:field_safe="true">
1007                 <fields oils_persist:primary="coded_value">
1008                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1009                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1010                 </fields>
1011                 <links>
1012                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1013                 </links>
1014         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1015             <actions>
1016                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1017                 <retrieve/>
1018                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1019                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1020             </actions>
1021         </permacrud>
1022         </class>
1023
1024         <class id="murav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::uncontrolled_record_attr_value" oils_persist:tablename="metabib.uncontrolled_record_attr_value" reporter:label="Uncontrolled Record Attribute Values" oils_persist:field_safe="true">
1025                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1026                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1027                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1028                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1029                 </fields>
1030                 <links>
1031                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1032                 </links>
1033         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1034             <actions>
1035                 <retrieve/>
1036             </actions>
1037         </permacrud>
1038         </class>
1039
1040
1041         <class id="mrs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_sorter" oils_persist:tablename="metabib.record_sorter" reporter:label="Record Sort Values" oils_persist:field_safe="true">
1042                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1043                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1044                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1045                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1046                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1047                 </fields>
1048                 <links>
1049                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1050                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1051                 </links>
1052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1053             <actions>
1054                 <retrieve/>
1055             </actions>
1056         </permacrud>
1057         </class>
1058
1059
1060         <class id="mravl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_vector_list" oils_persist:tablename="metabib.record_attr_vector_list" reporter:label="MVF Record Attribute Vectors" oils_persist:field_safe="true">
1061                 <fields oils_persist:primary="source">
1062                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1063                         <field reporter:label="Vector" name="vlist" reporter:datatype="text"  oils_obj:required="true"/> <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
1064                 </fields>
1065                 <links>
1066                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1067                 </links>
1068         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1069             <actions>
1070                 <retrieve/>
1071             </actions>
1072         </permacrud>
1073         </class>
1074
1075         <class id="mraf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_flat" oils_persist:tablename="metabib.record_attr_flat" reporter:label="MVF Record Attribute Flat List" oils_persist:field_safe="true">
1076                 <fields>
1077                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1078                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1079                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1080                 </fields>
1081                 <links>
1082                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1083                 </links>
1084         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1085             <actions>
1086                 <retrieve/>
1087             </actions>
1088         </permacrud>
1089         </class>
1090
1091         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true" oils_persist:readonly="true">
1092                 <fields oils_persist:primary="id">
1093                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1094                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1095                 </fields>
1096                 <links>
1097                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1098                 </links>
1099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1100             <actions>
1101                 <retrieve/>
1102             </actions>
1103         </permacrud>
1104         </class>
1105
1106         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
1107                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1108                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1109                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1110                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1111                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1112                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1113                 </fields>
1114                 <links>
1115                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1116                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1117                 </links>
1118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1119             <actions>
1120                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1121                 <retrieve/>
1122                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1123                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1124             </actions>
1125         </permacrud>
1126         </class>
1127
1128         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
1129                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1130                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1131                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1132                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1133                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1134                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1135                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1136                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1137             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1138             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1139             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1140                 </fields>
1141                 <links>
1142                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1143                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1144                 </links>
1145         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1146             <actions>
1147                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1148                 <retrieve/>
1149                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1150                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1151             </actions>
1152         </permacrud>
1153         </class>
1154
1155         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
1156                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1157                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1158                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1159                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1160                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1161                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1162                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1163                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1164                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1165                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1166                 </fields>
1167                 <links>
1168                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1169                 </links>
1170         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1171             <actions>
1172                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1173                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1174                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1175                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1176             </actions>
1177         </permacrud>
1178         </class>
1179
1180     <class id="czs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_source" oils_persist:tablename="config.z3950_source" reporter:label="Z39.50 Source">
1181         <fields oils_persist:primary="name">
1182             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1183             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1184             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1185             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1186             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1187             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1188             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1189             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1190             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1191             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1192         </fields>
1193         <links>
1194             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1195             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1196         </links>
1197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1198             <actions>
1199                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1200                 <retrieve/>
1201                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1202                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1203             </actions>
1204         </permacrud>
1205     </class>
1206
1207     <class id="cza" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
1208         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1209             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1210             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1211             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1212             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1213             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1214             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1215             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1216         </fields>
1217         <links>
1218             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1219         </links>
1220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1221             <actions>
1222                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1223                 <retrieve/>
1224                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1225                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1226             </actions>
1227         </permacrud>
1228     </class>
1229
1230     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1231                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1232                         oils_persist:tablename="config.z3950_index_field_map" 
1233                         reporter:label="Z39.50 Index Field Map">
1234         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1235             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1236             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1237             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1238             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1239             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1240             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1241         </fields>
1242         <links>
1243             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1244             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1245             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1246         </links>
1247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1248             <actions>
1249                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1250                 <retrieve/>
1251                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1252                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1253             </actions>
1254         </permacrud>
1255     </class>
1256
1257
1258         <class id="ateo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_output" oils_persist:tablename="action_trigger.event_output" reporter:label="Event Output">
1259                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1260                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1261                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1262                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1263                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1264                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1265                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1266                 </fields>
1267                 <links>
1268             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1269             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1270                 </links>
1271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1272                         <actions>
1273                                 <retrieve/>
1274                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1275                         </actions>
1276                 </permacrud>
1277         </class>
1278
1279         <class id="ath" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::hook" oils_persist:tablename="action_trigger.hook" reporter:label="Trigger Hook Point">
1280                 <fields oils_persist:primary="key">
1281                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1282                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1283                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1284                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1285                 </fields>
1286                 <links/>
1287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1288                         <actions>
1289                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1290                                 <retrieve/>
1291                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1292                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1293                         </actions>
1294                 </permacrud>
1295         </class>
1296
1297         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1298                 <fields oils_persist:primary="module">
1299                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1301                 </fields>
1302                 <links/>
1303         </class>
1304
1305         <class id="atval" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::validator" oils_persist:tablename="action_trigger.validator" reporter:label="Trigger Condition Validator">
1306                 <fields oils_persist:primary="module">
1307                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1308                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1309                 </fields>
1310                 <links/>
1311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1312                         <actions>
1313                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1314                                 <retrieve/>
1315                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1316                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1317                         </actions>
1318                 </permacrud>
1319         </class>
1320
1321         <class id="atreact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::reactor" oils_persist:tablename="action_trigger.reactor" reporter:label="Trigger Event Reactor">
1322                 <fields oils_persist:primary="module">
1323                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1324                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1325                 </fields>
1326                 <links/>
1327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1328                         <actions>
1329                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1330                                 <retrieve/>
1331                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1332                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1333                         </actions>
1334                 </permacrud>
1335         </class>
1336
1337         <class id="atclean" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::cleanup" oils_persist:tablename="action_trigger.cleanup" reporter:label="Trigger Event Cleanup">
1338                 <fields oils_persist:primary="module">
1339                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1340                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1341                 </fields>
1342                 <links/>
1343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1344                         <actions>
1345                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1346                                 <retrieve/>
1347                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1348                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1349                         </actions>
1350                 </permacrud>
1351         </class>
1352
1353         <class id="atenv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::environment" oils_persist:tablename="action_trigger.environment" reporter:label="Trigger Event Environment Entry">
1354                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1355                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1356                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1357                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1358                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1359                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1360                 </fields>
1361                 <links>
1362                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1363                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1364                 </links>
1365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1366                         <actions>
1367                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1368                     <context link="event_def" field="owner"/>
1369                 </create>
1370                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1371                     <context link="event_def" field="owner"/>
1372                 </retrieve>
1373                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1374                     <context link="event_def" field="owner"/>
1375                 </update>
1376                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1377                     <context link="event_def" field="owner"/>
1378                 </delete>
1379                         </actions>
1380                 </permacrud>
1381         </class>
1382
1383         <class id="atevdef" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_definition" oils_persist:tablename="action_trigger.event_definition" reporter:label="Trigger Event Definition">
1384                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1385                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1386                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1387                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1388                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1389                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1390                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1391                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1392                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1393                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1394                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1395                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1396                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1397                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1398                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1399                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1400                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1401                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1402                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1403                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1404                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1405                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1406                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1407                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1408                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1409                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1410                 </fields>
1411                 <links>
1412                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1413                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1414                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1415                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1416                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1417                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1418                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1419                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1420                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1421                 </links>
1422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1423                         <actions>
1424                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1425                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1426                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1427                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1428                         </actions>
1429                 </permacrud>
1430         </class>
1431
1432         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1433                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1434                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1435                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1436                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1437                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1438                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1439                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1440                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1441                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1442                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1443                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1444                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1445                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1446                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1447                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1448                 </fields>
1449                 <links>
1450                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1451                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1452                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1453                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1454                 </links>
1455         </class>
1456
1457         <class id="atevparam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_param" oils_persist:tablename="action_trigger.event_params" reporter:label="Trigger Event Parameter">
1458                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1459                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1460                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1461                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1462                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1463                 </fields>
1464                 <links>
1465                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1466                 </links>
1467                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1468                         <actions>
1469                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1470                     <context link="event_def" field="owner"/>
1471                 </create>
1472                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1473                     <context link="event_def" field="owner"/>
1474                 </retrieve>
1475                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1476                     <context link="event_def" field="owner"/>
1477                 </update>
1478                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1479                     <context link="event_def" field="owner"/>
1480                 </delete>
1481                         </actions>
1482                 </permacrud>
1483         </class>
1484
1485         <class id="atul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::user_log" reporter:label="Action Trigger User Log" oils_persist:readonly="true">
1486                 <oils_persist:source_definition><![CDATA[
1487                 SELECT  atevdef.hook,
1488                         atevdef.name,
1489                         atevdef.reactor,
1490                         atev.id,
1491                         atev.event_def,
1492                         atev.add_time,
1493                         atev.run_time,
1494                         atev.start_time,
1495                         atev.update_time,
1496                         atev.complete_time,
1497                         atev.update_process,
1498                         atev.state,
1499                         atev.user_data,
1500                         atev.template_output,
1501                         atev.error_output,
1502                         atev.async_output,
1503                         targ_circ.id AS target_circ,
1504                         targ_ahr.id AS target_hold,
1505                         COALESCE(
1506                                 targ_circ.circ_lib,
1507                                 targ_ahr.pickup_lib
1508                         ) AS perm_lib
1509                 FROM action_trigger.event atev
1510                 JOIN action_trigger.event_definition atevdef ON
1511                         (atevdef.id = atev.event_def)
1512                 JOIN action_trigger.hook ath ON
1513                         (ath.key = atevdef.hook)
1514                 LEFT JOIN action.circulation targ_circ ON
1515                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1516                 LEFT JOIN action.hold_request targ_ahr ON
1517                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1518                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1519                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1520                                 'circ.staff.max_visible_event_age',
1521                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1522                         ) UNION
1523                         SELECT '1000 YEARS'::INTERVAL AS value
1524                 ) ous)
1525                 ]]></oils_persist:source_definition>
1526                 <fields oils_persist:primary="id">
1527                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1528                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1529                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1530                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1531                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1532                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1533                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1534                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1535                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1536                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1537                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1538                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1539                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1540                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1541                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1542                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1543                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1544                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1545                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1546                 </fields>
1547                 <links>
1548                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1549                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1550                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1551                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1552                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1553                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1554                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1555                 </links>
1556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1557                         <actions>
1558                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1559                         </actions>
1560                 </permacrud>
1561         </class>
1562
1563         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1564                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1565                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1566                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1567                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1568                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1569                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1570                 </fields>
1571                 <links>
1572                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1573                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1574                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1575                 </links>
1576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1577                         <actions>
1578                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1579                         </actions>
1580                 </permacrud>
1581         </class>
1582
1583         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
1584                 <fields oils_persist:primary="code">
1585                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1586                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1587                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1588                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1589                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1590                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1591                 </fields>
1592                 <links/>
1593         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1594             <actions>
1595                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1596                 <retrieve/>
1597                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1598                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1599             </actions>
1600         </permacrud>
1601         </class>
1602
1603         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
1604                 <fields oils_persist:primary="code">
1605                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1606                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1607                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1608                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1609                 </fields>
1610                 <links/>
1611         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1612             <actions>
1613                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1614                 <retrieve/>
1615                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1616                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1617             </actions>
1618         </permacrud>
1619         </class>
1620
1621         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
1622                 <fields oils_persist:primary="code">
1623                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1624                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1625                 </fields>
1626                 <links/>
1627         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1628             <actions>
1629                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1630                 <retrieve/>
1631                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1632                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1633             </actions>
1634         </permacrud>
1635         </class>
1636
1637         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
1638                 <fields oils_persist:primary="code">
1639                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1640                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1641                 </fields>
1642                 <links/>
1643         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1644             <actions>
1645                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1646                 <retrieve/>
1647                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1648                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1649             </actions>
1650         </permacrud>
1651         </class>
1652
1653         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
1654                 <fields oils_persist:primary="code">
1655                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1656                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1657                 </fields>
1658                 <links/>
1659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1660             <actions>
1661                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1662                 <retrieve/>
1663                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1664                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1665             </actions>
1666         </permacrud>
1667         </class>
1668
1669         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1670                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1671                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1672                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1673                 </fields>
1674                 <links/>
1675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1676             <actions>
1677                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1678                 <retrieve/>
1679                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1680                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1681             </actions>
1682         </permacrud>
1683         </class>
1684
1685         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1686                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1687                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1688                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1689                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1690                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1691                 </fields>
1692         <links>
1693             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1694             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1695             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1696         </links>
1697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1698             <actions>
1699                 <create permission="UPDATE_COPY">
1700                     <context link="target_copy" field="circ_lib"/>
1701                 </create>
1702                 <retrieve/>
1703                 <update permission="UPDATE_COPY">
1704                     <context link="target_copy" field="circ_lib"/>
1705                 </update>
1706                 <delete permission="UPDATE_COPY">
1707                     <context link="target_copy" field="circ_lib"/>
1708                 </delete>
1709             </actions>
1710         </permacrud>
1711         </class>
1712
1713         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
1714                 <fields oils_persist:primary="code">
1715                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1716                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1717                 </fields>
1718                 <links/>
1719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1720             <actions>
1721                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1722                 <retrieve/>
1723                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1724                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1725             </actions>
1726         </permacrud>
1727         </class>
1728
1729         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
1730                 <fields oils_persist:primary="code">
1731                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1732                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1733                 </fields>
1734                 <links/>
1735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1736             <actions>
1737                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1738                 <retrieve/>
1739                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1740                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1741             </actions>
1742         </permacrud>
1743         </class>
1744
1745         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
1746                 <fields oils_persist:primary="code">
1747                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1748                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1749                 </fields>
1750                 <links/>
1751         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1752             <actions>
1753                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1754                 <retrieve/>
1755                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1756                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1757             </actions>
1758         </permacrud>
1759         </class>
1760
1761     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1762         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1763             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1764             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1765             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1766             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1767             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1768             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1769             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1770             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1771             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1772             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1773             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1774             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1775             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1776             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1777             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1778             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1779             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1780         </fields>
1781         <links/>
1782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1783             <actions>
1784                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1785                 <retrieve/>
1786                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1787                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1788             </actions>
1789         </permacrud>
1790     </class>
1791
1792     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1793         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1794             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1795             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1796             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1797             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1798             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1799             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1800             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1801             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1802             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1803             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1804             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1805             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1806             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1807             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1808             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1809             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1810             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1811             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1812             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1813         </fields>
1814         <links/>
1815         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1816             <actions>
1817                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1818                 <retrieve/>
1819                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1820                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1821             </actions>
1822         </permacrud>
1823     </class>
1824
1825     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1826         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1827             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1828             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1829             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1830             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1831             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1832         </fields>
1833         <links>
1834             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1835             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1836             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1837         </links>
1838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1839             <actions>
1840                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1841                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1842                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1843                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1844             </actions>
1845         </permacrud>
1846     </class>
1847
1848         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
1849                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1850                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1851                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1852                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1853                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1854                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1855                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1856                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1857                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1858                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1859                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1860                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1861                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1862                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1863                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1864                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1865                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1866             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1867                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1868                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1869                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1870                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1871                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1872                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1873                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1874                 </fields>
1875                 <links>
1876                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1877                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1878                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1879                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1880                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1881                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1882                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1883                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1884                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1885                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1886                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1887                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1888                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1889             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1890                 </links>
1891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1892             <actions>
1893                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1894                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1895                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1896                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1897             </actions>
1898         </permacrud>
1899         </class>
1900
1901         <class id="ccmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_matchpoint" oils_persist:tablename="config.circ_matrix_matchpoint" reporter:label="Circulation Matrix Matchpoint">
1902                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1903                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1904                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1905                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1906                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1907                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1908                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1909                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1910                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1911                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1912                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1913                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1914                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1915                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1916                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1917                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1918             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1919                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1920                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1921             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1922                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1923                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1924                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1925                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1926             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1927             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1928             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1929                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1930                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1931                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1932                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1933                 </fields>
1934                 <links>
1935                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1936                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1937                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1938                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1939                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1940                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1941                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1942                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1943                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1944                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1945                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1946                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1947                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1948                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1949             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1950                 </links>
1951         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1952             <actions>
1953                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1954                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1955                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1956                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1957             </actions>
1958         </permacrud>
1959         </class>
1960
1961     <class id="cclg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_group" oils_persist:tablename="config.circ_limit_group" reporter:label="Circulation Limit Group">
1962         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1963             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1964             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1965             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1966         </fields>
1967         <links/>
1968         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1969             <actions>
1970                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1971                 <retrieve/>
1972                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1973                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1974             </actions>
1975         </permacrud>
1976     </class>
1977
1978     <class id="ccls" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set" oils_persist:tablename="config.circ_limit_set" reporter:label="Circulation Limit Set">
1979         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1980             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1981             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1982             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1983             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1984             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1985             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1986             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1987         </fields>
1988         <links>
1989             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1990         </links>
1991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1992             <actions>
1993                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1994                 <retrieve/>
1995                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1996                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1997             </actions>
1998         </permacrud>
1999     </class>
2000
2001     <class id="ccmlsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_limit_set_map" oils_persist:tablename="config.circ_matrix_limit_set_map" reporter:label="Circulation Matrix Limit Set Map">
2002         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2003             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2004             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2005             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2006             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2007             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2008         </fields>
2009         <links>
2010             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2011             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2012         </links>
2013         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2014             <actions>
2015                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2016                     <context link="matchpoint" field="org_unit"/>
2017                 </create>
2018                 <retrieve/>
2019                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2020                     <context link="matchpoint" field="org_unit"/>
2021                 </update>
2022                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2023                     <context link="matchpoint" field="org_unit"/>
2024                 </delete>
2025             </actions>
2026         </permacrud>
2027     </class>
2028
2029     <class id="cclscmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_circ_mod_map" oils_persist:tablename="config.circ_limit_set_circ_mod_map" reporter:label="Circulation Limit Set Circ Mod Map">
2030         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2031             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2032             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2033             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2034         </fields>
2035         <links>
2036             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2037             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2038         </links>
2039         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2040             <actions>
2041                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2042                     <context link="limit_set" field="owning_lib"/>
2043                 </create>
2044                 <retrieve/>
2045                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2046                     <context link="limit_set" field="owning_lib"/>
2047                 </update>
2048                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2049                     <context link="limit_set" field="owning_lib"/>
2050                 </delete>
2051             </actions>
2052         </permacrud>
2053     </class>
2054     <class id="cclsacpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_copy_loc_map" oils_persist:tablename="config.circ_limit_set_copy_loc_map" reporter:label="Circulation Limit Set Copy Location Map">
2055         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2056             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2057             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2058             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2059         </fields>
2060         <links>
2061             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2062             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2063         </links>
2064         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2065             <actions>
2066                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2067                     <context link="limit_set" field="owning_lib"/>
2068                 </create>
2069                 <retrieve/>
2070                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2071                     <context link="limit_set" field="owning_lib"/>
2072                 </update>
2073                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2074                     <context link="limit_set" field="owning_lib"/>
2075                 </delete>
2076             </actions>
2077         </permacrud>
2078     </class>
2079
2080     <class id="cclsgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_group_map" oils_persist:tablename="config.circ_limit_set_group_map" reporter:label="Circulation Limit Set Group Map">
2081         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2082             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2083             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2084             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2085             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2086         </fields>
2087         <links>
2088             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2089             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2090         </links>
2091         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2092             <actions>
2093                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2094                     <context link="limit_set" field="owning_lib"/>
2095                 </create>
2096                 <retrieve/>
2097                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2098                     <context link="limit_set" field="owning_lib"/>
2099                 </update>
2100                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2101                     <context link="limit_set" field="owning_lib"/>
2102                 </delete>
2103             </actions>
2104         </permacrud>
2105     </class>
2106
2107         <class id="cit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::identification_type" oils_persist:tablename="config.identification_type" reporter:label="Identification Type">
2108                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2109                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2110                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2111                 </fields>
2112                 <links/>
2113         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2114             <actions>
2115                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2116                 <retrieve/>
2117                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2118                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2119             </actions>
2120         </permacrud>
2121         </class>
2122
2123         <class id="asvq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_question" oils_persist:tablename="action.survey_question" reporter:label="User Survey Question">
2124                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2125                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2126                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2127                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2128                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2129                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2130                 </fields>
2131                 <links>
2132                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2133                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2134                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2135                 </links>
2136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2137             <actions>
2138                 <create permission="ADMIN_SURVEY">
2139                     <context link="survey" field="owner"/>
2140                 </create>
2141                 <retrieve/>
2142                 <update permission="ADMIN_SURVEY">
2143                     <context link="survey" field="owner"/>
2144                 </update>
2145                 <delete permission="ADMIN_SURVEY">
2146                     <context link="survey" field="owner"/>
2147                 </delete>
2148             </actions>
2149         </permacrud>
2150         </class>
2151         <class id="mbts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
2152                 <fields oils_persist:primary="id" oils_persist:sequence="">
2153                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2154                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2155                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2156                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2157                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2158                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2159                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2160                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2161                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2162                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2163                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2164                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2165                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2166                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2167                 </fields>
2168                 <links>
2169                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2170                 </links>
2171                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2172                         <actions>
2173                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2174                                         <context link="usr" field="home_ou" />
2175                                 </retrieve>
2176                         </actions>
2177                 </permacrud>
2178         </class>
2179         <class id="mbtslv" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary_location_view" oils_persist:tablename="money.billable_xact_summary_location_view" reporter:label="Billable Transaction Summary with Billing Location" oils_persist:readonly="true" reporter:core="true">
2180                 <fields oils_persist:primary="id" oils_persist:sequence="">
2181                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2182                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2183                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2184                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2185                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2186                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2187                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2188                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2189                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2190                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2191                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2192                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2193                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2194                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2195                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2196                 </fields>
2197                 <links>
2198                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2199                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2200                 </links>
2201         </class>
2202         <class id="aum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message" oils_persist:tablename="actor.usr_message" reporter:label="User Message">
2203                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2204                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2205                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2206                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2207                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2208                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2209                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2210                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2211                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2212                 </fields>
2213                 <links>
2214                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2215                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2216                 </links>
2217                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2218                         <actions> <!-- created magically, so no create action -->
2219                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2220                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2221                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2222                         </actions>
2223                 </permacrud>
2224         </class>
2225         <class id="auml" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message_limited" oils_persist:tablename="actor.usr_message_limited" reporter:label="User Message (Limited Access)">
2226                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2227                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2228                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2229                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2230                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2231                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2232                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2233                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2234                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2235                 </fields>
2236                 <links>
2237                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2238                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2239                 </links>
2240                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2241                         <actions> <!-- created magically, so no create action -->
2242                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2243                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2244                         </actions>
2245                 </permacrud>
2246         </class>
2247         <class id="aun" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
2248                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2249                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2250                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2251                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2252                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2253                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2254                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2255                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2256                 </fields>
2257                 <links>
2258                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2259                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2260                 </links>
2261         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2262             <actions>
2263                 <create permission="UPDATE_USER" context_field="owner">
2264                     <context link="usr" field="home_ou"/>
2265                 </create>
2266                                 <!-- note: public notes are still accessible via API -->
2267                 <retrieve permission="UPDATE_USER">
2268                     <context link="usr" field="home_ou"/>
2269                                 </retrieve>
2270                 <update permission="UPDATE_USER">
2271                     <context link="usr" field="home_ou"/>
2272                                 </update>
2273                 <delete permission="UPDATE_USER">
2274                     <context link="usr" field="home_ou"/>
2275                                 </delete>
2276             </actions>
2277         </permacrud>
2278         </class>
2279         <class id="aupr" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_password_reset" oils_persist:tablename="actor.usr_password_reset" reporter:label="User password reset requests">
2280                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2281                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2282                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2283                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2284                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2285                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2286                 </fields>
2287                 <links>
2288                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2289                 </links>
2290         </class>
2291         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2292                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2293                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2294                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2295                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2296                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2297                 </fields>
2298                 <links>
2299                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2300                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2301                 </links>
2302         </class>
2303         <class id="mafe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::author_field_entry" oils_persist:tablename="metabib.author_field_entry" reporter:label="Author Field Entry">
2304                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2305                         <field name="field" reporter:datatype="link"/>
2306                         <field name="id" reporter:datatype="id" />
2307                         <field name="source" reporter:datatype="link"/>
2308                         <field name="value" reporter:datatype="text"/>
2309                 </fields>
2310                 <links>
2311                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2312                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2313                 </links>
2314         </class>
2315         <class id="aihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
2316                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2317                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2318                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2319                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2320                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2321                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2322                 </fields>
2323                 <links>
2324                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2325                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2326                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2327                 </links>
2328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2329                         <actions>
2330                                 <retrieve/>
2331                         </actions>
2332                 </permacrud>
2333         </class>
2334         <class id="ancihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
2335                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2336                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2337                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2338                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2339                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2340                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2341                 </fields>
2342                 <links>
2343                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2344                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2345                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2346                 </links>
2347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2348                         <actions>
2349                                 <retrieve/>
2350                         </actions>
2351                 </permacrud>
2352         </class>
2353         <class id="atc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::transit_copy" oils_persist:tablename="action.transit_copy" reporter:core="true" reporter:label="Copy Transit">
2354                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2355                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2356                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2357                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2358                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2359                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2360                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2361                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2362                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2363                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2364                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2365                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2366                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2367                 </fields>
2368                 <links>
2369                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2370                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2371                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2372                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2373                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2374                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2375                 </links>
2376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2377             <actions>
2378                 <create permission="TRANSIT_COPY" context_field="owner">
2379                     <context link="target_copy" field="circ_lib"/>
2380                 </create>
2381                 <retrieve/>
2382                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2383                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2384             </actions>
2385         </permacrud>
2386         </class>
2387         <class id="asvr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_response" oils_persist:tablename="action.survey_response" reporter:label="Survey Response">
2388                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2389                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2390                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2391                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2392                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2393                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2394                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2395                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2396                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2397                 </fields>
2398                 <links>
2399                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2400                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2401                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2402                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2403                 </links>
2404         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2405             <actions>
2406                 <create permission="ADMIN_SURVEY">
2407                     <context link="survey" field="owner"/>
2408                 </create>
2409                 <retrieve permission="VIEW_USER">
2410                     <context link="usr" field="home_ou"/>
2411                 </retrieve>
2412                 <update permission="ADMIN_SURVEY">
2413                     <context link="survey" field="owner"/>
2414                 </update>
2415                 <delete permission="ADMIN_SURVEY">
2416                     <context link="survey" field="owner"/>
2417                 </delete>
2418             </actions>
2419         </permacrud>
2420         </class>
2421         <class id="ccbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2422                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2423                         <field name="bucket" />
2424                         <field name="id" reporter:datatype="id" />
2425                         <field name="target_copy" reporter:datatype="link"/>
2426                         <field name="create_time" reporter:datatype="timestamp" />
2427                         <field name="pos" reporter:datatype="int" />
2428                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2429                 </fields>
2430                 <links>
2431                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2432                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2433             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2434                 </links>
2435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2436                         <actions>
2437                                 <retrieve permission="ADMIN_COPY_BUCKET">
2438                     <context link="bucket" owning_lib="owning_lib"/>
2439                 </retrieve>
2440             </actions>
2441         </permacrud>
2442         </class>
2443         <class id="ccbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item_note" oils_persist:tablename="container.copy_bucket_item_note" reporter:label="Copy Bucket Item Note">
2444                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2445                         <field name="id" reporter:datatype="id" />
2446                         <field name="item" reporter:datatype="link"/>
2447                         <field name="note" reporter:datatype="text" />
2448                 </fields>
2449                 <links>
2450                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2451                 </links>
2452         </class>
2453
2454         <class id="acs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set" oils_persist:tablename="authority.control_set" reporter:label="Authority Control Set" oils_persist:field_safe="true">
2455                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2456                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2457                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2458                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2459                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2460                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2461                 </fields>
2462                 <links>
2463                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2464                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2465                 </links>
2466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2467                         <actions>
2468                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2469                                 <retrieve/>
2470                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2471                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2472                         </actions>
2473                 </permacrud>
2474         </class>
2475
2476         <class id="acsaf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_authority_field" oils_persist:tablename="authority.control_set_authority_field" reporter:label="Authority Control Set Authority Field" oils_persist:field_safe="true">
2477                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2478                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2479                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2480                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2481                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2482                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2483                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2484                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2485                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2486                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2487                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2488                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2489                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2490                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2491                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2492                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2493                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2494                 </fields>
2495                 <links>
2496                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2497                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2498                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2499                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2500                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2501                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2502                         <link field="heading" reltype="has_a" key="id" map="" class="ahf"/>
2503                 </links>
2504                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2505                         <actions>
2506                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2507                                 <retrieve/>
2508                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2509                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2510                         </actions>
2511                 </permacrud>
2512         </class>
2513
2514         <class id="acsbf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field" oils_persist:tablename="authority.control_set_bib_field" reporter:label="Authority Control Set Bib Field" oils_persist:field_safe="true">
2515                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2516                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2517                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2518                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2519                 </fields>
2520                 <links>
2521                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2522                 </links>
2523                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2524                         <actions>
2525                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2526                                 <retrieve/>
2527                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2528                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2529                         </actions>
2530                 </permacrud>
2531         </class>
2532
2533         <class id="acsbfmfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field_metabib_field_map" oils_persist:tablename="authority.control_set_bib_field_metabib_field_map" reporter:label="Authority Control Set Bib Field to Metabib Field Map" oils_persist:field_safe="true">
2534                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2535                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2536                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2537                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2538                 </fields>
2539                 <links>
2540                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2541                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2542                 </links>
2543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2544                         <actions>
2545                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2546                                 <retrieve/>
2547                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2548                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2549                         </actions>
2550                 </permacrud>
2551         </class>
2552
2553         <class id="at" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::thesaurus" oils_persist:tablename="authority.thesaurus" reporter:label="Authority Thesaurus" oils_persist:field_safe="true">
2554                 <fields oils_persist:primary="code">
2555                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2556                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2557                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2558                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2559                         <field reporter:label="Short Code" name="short_code" reporter:datatype="text" />
2560                         <field reporter:label="URI" name="uri" reporter:datatype="text" />
2561                 </fields>
2562                 <links>
2563                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2564                 </links>
2565                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2566                         <actions>
2567                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2568                                 <retrieve/>
2569                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2570                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2571                         </actions>
2572                 </permacrud>
2573         </class>
2574
2575         <class id="aba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis" oils_persist:tablename="authority.browse_axis" reporter:label="Authority Browse Axis" oils_persist:field_safe="true">
2576                 <fields oils_persist:primary="code">
2577                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2578                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2579                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2580                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2581                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2582                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2583                 </fields>
2584                 <links>
2585                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2586                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2587                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2588                 </links>
2589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2590                         <actions>
2591                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2592                                 <retrieve/>
2593                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2594                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2595                         </actions>
2596                 </permacrud>
2597         </class>
2598
2599     <class id="abaafm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis_authority_field_map" oils_persist:tablename="authority.browse_axis_authority_field_map" reporter:label="Authority Browse Axis Field Map" oils_persist:field_safe="true">
2600         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2601             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2602             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2603             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2604         </fields>
2605         <links>
2606             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2607             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2608         </links>
2609         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2610             <actions>
2611                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2612                 <retrieve/>
2613                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2614                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2615             </actions>
2616         </permacrud>
2617     </class>
2618
2619         <class id="are" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
2620                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2621                         <field name="active" reporter:datatype="bool"/>
2622                         <field name="create_date" reporter:datatype="timestamp"/>
2623                         <field name="creator" />
2624                         <field name="deleted" reporter:datatype="bool"/>
2625                         <field name="edit_date" reporter:datatype="timestamp"/>
2626                         <field name="editor" />
2627                         <field name="id" reporter:datatype="id" />
2628                         <field name="last_xact_id" />
2629                         <field name="marc" />
2630                         <field name="source" />
2631                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2632                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2633                         <field name="heading" />
2634                         <field name="simple_heading" />
2635                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2636                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2637                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2638                 </fields>
2639                 <links>
2640                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2641                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2642                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2643                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2644                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2645                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2646                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2647                 </links>
2648                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2649                         <actions>
2650                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2651                                 <retrieve/>
2652                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2653                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2654                         </actions>
2655                 </permacrud>
2656         </class>
2657         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2658                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2659                         <field name="char_encoding" />
2660                         <field name="id" />
2661                         <field name="record" />
2662                         <field name="record_status" />
2663                         <field name="thesaurus" />
2664                 </fields>
2665                 <links>
2666                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2667                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2668                 </links>
2669         </class>
2670         <class id="abl" controller="open-ils.cstore" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
2671                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2672                         <field name="id" reporter:datatype="id" />
2673                         <field name="bib" reporter:datatype="link" />
2674                         <field name="authority" reporter:datatype="link" />
2675                 </fields>
2676                 <links>
2677                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2678                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2679                 </links>
2680         </class>
2681         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2682                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2683                         <field name="id" reporter:datatype="id" />
2684                         <field name="record" reporter:datatype="link" />
2685                         <field name="atag" reporter:datatype="link" />
2686                         <field name="value" reporter:datatype="text" />
2687                 </fields>
2688                 <links>
2689                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2690                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2691                 </links>
2692         </class>
2693
2694         <class id="ahf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::heading_field" oils_persist:tablename="authority.heading_field" reporter:label="Authority Heading Fields">
2695                 <fields oils_persist:primary="id" oils_persist:sequence="authority.heading_fields_id_seq">
2696                         <field name="id" reporter:datatype="id" />
2697                         <field name="heading_type" reporter:datatype="text" reporter:label="Heading Type" />
2698                         <field name="heading_purpose" reporter:datatype="text" reporter:label="Heading Purpose" />
2699                         <field name="label" reporter:datatype="text" reporter:label="Heading Field Label" />
2700                         <field name="format" reporter:datatype="text" reporter:label="Heading XSLT Format" />
2701                         <field name="heading_xpath" reporter:datatype="text" reporter:label="Heading XPath" />
2702                         <field name="component_xpath" reporter:datatype="text" reporter:label="Heading Component XPath" />
2703                         <field name="type_xpath" reporter:datatype="text" reporter:label="Related/Variant Type XPath" />
2704                         <field name="thesaurus_xpath" reporter:datatype="text" reporter:label="Thesaurus XPath" />
2705                         <field name="thesaurus_override_xpath" reporter:datatype="text" reporter:label="Thesaurus Override XPath" />
2706                         <field name="joiner" reporter:datatype="text" reporter:label="Joiner string" />
2707                 </fields>
2708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2709                         <actions>
2710                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2711                                 <retrieve/>
2712                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2713                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2714                         </actions>
2715                 </permacrud>
2716         </class>
2717
2718         <class id="clm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::language_map" oils_persist:tablename="config.language_map" reporter:label="Language Map" oils_persist:field_safe="true">
2719                 <fields oils_persist:primary="code" oils_persist:sequence="">
2720                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2721                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2722                 </fields>
2723                 <links/>
2724         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2725             <actions>
2726                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2727                 <retrieve/>
2728                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2729                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2730             </actions>
2731         </permacrud>
2732         </class>
2733         <class id="mccp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2734                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2735                         <field name="accepting_usr" />
2736                         <field name="amount" reporter:datatype="money" />
2737                         <field name="amount_collected" reporter:datatype="money" />
2738                         <field name="approval_code" reporter:datatype="text"/>
2739                         <field name="cash_drawer" reporter:datatype="link"/>
2740                         <field name="cc_number" reporter:datatype="text"/>
2741                         <field name="cc_order_number" reporter:datatype="text"/>
2742                         <field name="cc_processor" reporter:datatype="text"/>
2743                         <field name="id" reporter:datatype="id" />
2744                         <field name="note" reporter:datatype="text"/>
2745                         <field name="payment_ts" reporter:datatype="timestamp"/>
2746                         <field name="xact" reporter:datatype="link"/>
2747                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2748                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2749                 </fields>
2750                 <links>
2751                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2752                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2753                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2754                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2755                 </links>
2756         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2757             <actions>
2758                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2759                     <context link="xact" jump="usr" field="home_ou"/>
2760                 </retrieve>
2761                         </actions>
2762                 </permacrud>
2763         </class>
2764         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition" oils_persist:field_safe="true">
2765                 <fields oils_persist:primary="name">
2766                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2767                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2768                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2769                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2770                 </fields>
2771                 <links/>
2772         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2773             <actions>
2774                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2775                 <retrieve/>
2776                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2777                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2778             </actions>
2779         </permacrud>
2780         </class>
2781
2782         <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias" oils_persist:field_safe="true">
2783                 <fields oils_persist:primary="alias">
2784                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2785                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2786                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2787                 </fields>
2788                 <links>
2789                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2790                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2791                 </links>
2792         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2793             <actions>
2794                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2795                 <retrieve/>
2796                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2797                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2798             </actions>
2799         </permacrud>
2800         </class>
2801
2802         <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class" oils_persist:field_safe="true">
2803                 <fields oils_persist:primary="name">
2804                         <field reporter:label="Name" name="name" reporter:datatype="text" reporter:selector="label"/>
2805                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2806                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2807                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2808                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2809                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2810                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2811                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2812                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2813                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2814                 </fields>
2815                 <links>
2816                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2817                 </links>
2818         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2819             <actions>
2820                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2821                 <retrieve/>
2822                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2823                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2824             </actions>
2825         </permacrud>
2826         </class>
2827
2828         <class id="cmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field" oils_persist:tablename="config.metabib_field" reporter:label="Metabib Field" oils_persist:field_safe="true">
2829                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2830                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2831                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2832                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2833                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2834                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2835                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2836                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
2837                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2838                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2839                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2840                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2841                         <field reporter:label="Display Field?" name="display_field" reporter:datatype="bool" />
2842                         <field reporter:label="Display XPath" name="display_xpath" reporter:datatype="text" />
2843                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2844                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2845                         <field reporter:label="Browse Sort XPath" name="browse_sort_xpath" reporter:datatype="text" />
2846                         <field reporter:label="Authority XPath" name="authority_xpath" reporter:datatype="text" />
2847                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2848                         <field reporter:label="Display Field Map" name="display_field_map" oils_persist:virtual="true" reporter:datatype="link"/>
2849                         <field reporter:label="Virtual Field Data Suppliers" name="data_sources" oils_persist:virtual="true" reporter:datatype="link"/>
2850                 </fields>
2851                 <links>
2852                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
2853                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2854                         <link field="display_field_map" reltype="might_have" key="field" map="" class="cdfm"/>
2855                         <link field="data_sources" reltype="has_many" key="virtual" map="" class="cmfvm"/>
2856                 </links>
2857         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2858             <actions>
2859                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2860                 <retrieve/>
2861                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2862                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2863             </actions>
2864         </permacrud>
2865         </class>
2866
2867         <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">
2868                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_virtual_map_id_seq">
2869                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2870                         <field reporter:label="Real" name="real" reporter:datatype="link"/>
2871                         <field reporter:label="Virtual" name="virtual" reporter:datatype="link"/>
2872                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
2873                 </fields>
2874                 <links>
2875                         <link field="real" reltype="has_a" key="id" map="" class="cmf"/>
2876                         <link field="virtual" reltype="has_a" key="id" map="" class="cmf"/>
2877                 </links>
2878         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2879             <actions>
2880                 <create permission="CREATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2881                 <retrieve/>
2882                 <update permission="UPDATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2883                 <delete permission="DELETE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2884             </actions>
2885         </permacrud>
2886         </class>
2887
2888         <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">
2889                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2890                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2891                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2892                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2893                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2894                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2895                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2896                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2897                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2898                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2899                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2900                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2901                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2902                 </fields>
2903                 <links>
2904                 </links>
2905                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2906                         <actions>
2907                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2908                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2909                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2910                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2911                         </actions>
2912                 </permacrud>
2913         </class>
2914         <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">
2915                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2916                         <field name="id" reporter:datatype="id" />
2917                         <field name="name" reporter:datatype="text"/>
2918                         <field name="xpath" reporter:datatype="text"/>
2919                         <field name="format" reporter:datatype="link"/>
2920                         <field name="first_word" reporter:datatype="bool" />
2921                 </fields>
2922                 <links/>
2923         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2924             <actions>
2925                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2926                 <retrieve/>
2927                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2928                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2929             </actions>
2930         </permacrud>
2931         </class>
2932         <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">
2933                 <fields oils_persist:primary="code" oils_persist:sequence="">
2934                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2935                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2936                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2937                 </fields>
2938                 <links/>
2939         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2940             <actions>
2941                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2942                 <retrieve/>
2943                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2944                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2945             </actions>
2946         </permacrud>
2947         </class>
2948         <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">
2949                 <fields oils_persist:primary="code" oils_persist:sequence="">
2950                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2951                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2952                 </fields>
2953                 <links/>
2954         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2955             <actions>
2956                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2957                 <retrieve/>
2958                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2959                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2960             </actions>
2961         </permacrud>
2962         </class>
2963     <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">
2964         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2965             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2966             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2967             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2968             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2969         </fields>
2970         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2971             <actions>
2972                 <retrieve/>
2973             </actions>
2974         </permacrud>
2975     </class>
2976         <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">
2977                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2978                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2979                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2980                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2981                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2982                 </fields>
2983                 <links>
2984                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2985                 </links>
2986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2987             <actions>
2988                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2989                 <retrieve/>
2990                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2991                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2992             </actions>
2993         </permacrud>
2994         </class>
2995         <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">
2996                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2997                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2998                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2999                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3000                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3001                 </fields>
3002                 <links>
3003                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3004                 </links>
3005         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3006             <actions>
3007                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
3008                 <retrieve/>
3009                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
3010                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
3011             </actions>
3012         </permacrud>
3013         </class>
3014         <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">
3015                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
3016                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3017                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
3018                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3019                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3020                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3021                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3022                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
3023                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
3024                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3025                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3026                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3027                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3028                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
3029                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
3030                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3031                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3032                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3033                 </fields>
3034                 <links>
3035                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3036                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3037                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3038                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3039                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3040                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3041                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3042                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3043                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3044                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3045                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3046                 </links>
3047         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3048             <actions>
3049                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3050                 <retrieve/>
3051                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3052                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3053             </actions>
3054         </permacrud>
3055         </class>
3056         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3057                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3058                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3059                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3060                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3061                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3062                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3063                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3064                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3065                 </fields>
3066                 <links>
3067                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3068                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3069         </links>
3070         </class>
3071         <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">
3072                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3073                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3074                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3075                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3076                 </fields>
3077                 <links>
3078                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3079                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3080                 </links>
3081         </class>
3082         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3083                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3084                         <field name="id" reporter:datatype="id" />
3085                         <field name="value" oils_persist:i18n="true" />
3086                 </fields>
3087                 <links/>
3088         </class>
3089         <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">
3090                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3091                         <field name="balance_owed" reporter:datatype="money" />
3092                         <field name="total_owed" reporter:datatype="money" />
3093                         <field name="total_paid" reporter:datatype="money" />
3094                         <field name="usr" reporter:datatype="link"/>
3095                 </fields>
3096                 <links>
3097                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3098         </links>
3099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3100             <actions>
3101                 <retrieve permission="VIEW_USER">
3102                     <context link="usr" field="home_ou"/>
3103                 </retrieve>
3104             </actions>
3105         </permacrud>
3106         </class>
3107         <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">
3108                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3109                         <field name="collector" />
3110                         <field name="enter_time" reporter:datatype="timestamp"/>
3111                         <field name="id" reporter:datatype="id" />
3112                         <field name="location" reporter:datatype="link"/>
3113                         <field name="usr" reporter:datatype="link"/>
3114                 </fields>
3115                 <links>
3116                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3117                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3118                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3119                 </links>
3120         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3121             <actions>
3122                 <create permission="money.collections_tracker.create" context_field="location"/>
3123                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3124                 <delete permission="money.collections_tracker.create" context_field="location"/>
3125             </actions>
3126         </permacrud>
3127         </class>
3128         <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">
3129                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3130                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3131                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3132                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3133                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3134                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3135                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3136                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3137                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3138                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3139                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3140                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3141                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3142                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3143                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3144                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3145                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3146                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3147                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3148                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3149                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3150                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3151                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3152                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3153                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3154                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3155                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3156                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3157                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3158                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3159                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3160                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3161                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3162                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3163                         <field reporter:label="Display Fields" name="display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3164                         <field reporter:label="Flat Display Entries" name="flat_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3165                         <field reporter:label="Compressed Display Entries" name="compressed_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3166                         <field reporter:label="Wide Display Entries" name="wide_display_entry" oils_persist:virtual="true" reporter:datatype="link"/>
3167                         <field reporter:label="Merge Date" name="merge_date" reporter:datatype="timestamp"/>
3168                         <field reporter:label="Merged To" name="merged_to" reporter:datatype="link"/>
3169                 </fields>
3170                 <links>
3171                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3172                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3173                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3174                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3175                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3176                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3177                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3178                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3179                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3180                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3181                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3182                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3183                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3184                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3185                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3186                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3187                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3188                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3189                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3190                         <link field="mattrs" reltype="might_have" key="id" map="" class="mraf"/>
3191                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3192                         <link field="display_entries" reltype="has_many" key="source" map="" class="mde"/>
3193                         <link field="flat_display_entries" reltype="has_many" key="source" map="" class="mfde"/>
3194                         <link field="compressed_display_entries" reltype="has_many" key="source" map="" class="mcde"/>
3195                         <link field="wide_display_entry" reltype="might_have" key="source" map="" class="mwde"/>
3196                         <link field="merged_to" reltype="has_a" key="id" map="" class="bre"/>
3197                 </links>
3198         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3199             <actions>
3200                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3201                 <retrieve/>
3202                 <update permission="UPDATE_MARC" global_required="true"/>
3203                 <!-- 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. -->
3204                 <delete permission="DELETE_RECORD" global_required="true"/>
3205             </actions>
3206         </permacrud>
3207         </class>
3208         <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">
3209                 <fields oils_persist:primary="id">
3210                         <field name="dow_0_close" />
3211                         <field name="dow_0_open" />
3212                         <field name="dow_1_close" />
3213                         <field name="dow_1_open" />
3214                         <field name="dow_2_close" />
3215                         <field name="dow_2_open" />
3216                         <field name="dow_3_close" />
3217                         <field name="dow_3_open" />
3218                         <field name="dow_4_close" />
3219                         <field name="dow_4_open" />
3220                         <field name="dow_5_close" />
3221                         <field name="dow_5_open" />
3222                         <field name="dow_6_close" />
3223                         <field name="dow_6_open" />
3224                         <field name="id" reporter:datatype="id" />
3225                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3226                 </fields>
3227                 <links>
3228                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3229                 </links>
3230         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3231             <actions>
3232                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3233                 <retrieve/>
3234                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3235                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3236             </actions>
3237         </permacrud>
3238         </class>
3239         <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">
3240                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3241                         <field name="id" reporter:datatype="id" />
3242                         <field name="record" reporter:datatype="link"/>
3243                         <field name="label" reporter:datatype="text"/>
3244                         <field name="label_sortkey" reporter:datatype="text"/>
3245                         <field name="deleted" reporter:datatype="bool"/>
3246                 </fields>
3247                 <links>
3248                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3249                 </links>
3250         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3251             <actions>
3252                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3253                 <retrieve/>
3254                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3255                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3256             </actions>
3257         </permacrud>
3258         </class>
3259         <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">
3260                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3261                         <field name="id" reporter:datatype="id" />
3262                         <field name="target_copy" reporter:datatype="link" />
3263                         <field name="part" reporter:datatype="link"/>
3264                 </fields>
3265                 <links>
3266                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3267                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3268                 </links>
3269         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3270             <actions>
3271                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3272                 <retrieve/>
3273                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3274                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3275             </actions>
3276         </permacrud>
3277         </class>
3278         <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">
3279                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3280                         <field name="close_end" reporter:datatype="timestamp" />
3281                         <field name="close_start" reporter:datatype="timestamp" />
3282                         <field name="id" reporter:datatype="id" />
3283                         <field name="org_unit" reporter:datatype="org_unit"/>
3284                         <field name="reason" reporter:datatype="text"/>
3285                         <field name="full_day" reporter:datatype="bool"/>
3286                         <field name="multi_day" reporter:datatype="bool"/>
3287                 </fields>
3288                 <links>
3289                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3290                 </links>
3291         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3292             <actions>
3293                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3294                 <retrieve/>
3295                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3296                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3297             </actions>
3298         </permacrud>
3299         </class>
3300         <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">
3301                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3302                         <field name="extended" reporter:datatype="interval"/>
3303                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3304                         <field name="max_renewals" reporter:datatype="int" />
3305                         <field name="name" reporter:datatype="text"/>
3306                         <field name="normal" reporter:datatype="interval"/>
3307                         <field name="shrt" reporter:datatype="interval"/>
3308                 </fields>
3309                 <links>
3310                 </links>
3311         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3312             <actions>
3313                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3314                 <retrieve/>
3315                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3316                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3317             </actions>
3318         </permacrud>
3319         </class>
3320
3321         <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">
3322                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3323                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3324                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3325             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3326                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3327             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3328                 </fields>
3329                 <links>
3330             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3331                 </links>
3332                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3333             <actions>
3334                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3335                 <retrieve/>
3336                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3337                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3338             </actions>
3339                 </permacrud>
3340         </class>
3341
3342         <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">
3343                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3344                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3345                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3346                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3347             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3348                 </fields>
3349                 <links>
3350                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3351                 </links>
3352                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3353             <actions>
3354                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3355                 <retrieve/>
3356                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3357                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3358             </actions>
3359                 </permacrud>
3360         </class>
3361
3362         <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">
3363                 <fields oils_persist:primary="id" oils_persist:sequence="">
3364                         <field name="balance_owed" reporter:datatype="money"/>
3365                         <field name="id" reporter:datatype="id" />
3366                         <field name="last_billing_note" reporter:datatype="text"/>
3367                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3368                         <field name="last_billing_type" reporter:datatype="text"/>
3369                         <field name="last_payment_note" reporter:datatype="text"/>
3370                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3371                         <field name="last_payment_type" reporter:datatype="text"/>
3372                         <field name="total_owed" reporter:datatype="money"/>
3373                         <field name="total_paid" reporter:datatype="money"/>
3374                         <field name="usr" reporter:datatype="link"/>
3375                         <field name="xact_finish" reporter:datatype="timestamp" />
3376                         <field name="xact_start" reporter:datatype="timestamp" />
3377                         <field name="xact_type" reporter:datatype="text"/>
3378                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3379                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3380                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3381                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3382                         <field name="billing_location" reporter:datatype="link"/>
3383                 </fields>
3384                 <links>
3385                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3386                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3387                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3388                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3389                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3390                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3391                 </links>
3392                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3393                         <actions>
3394                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3395                                         <context link="usr" field="home_ou" />
3396                                 </retrieve>
3397                         </actions>
3398                 </permacrud>
3399         </class>
3400         <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">
3401                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3402                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3403                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3404                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3405                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3406                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3407                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3408                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3409                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3410                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3411                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3412                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3413                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3414                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3415                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3416                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3417                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3418                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3419                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3420                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3421                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3422                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3423                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3424                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3425                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3426                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3427                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3428                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3429                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3430                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3431                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3432                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3433                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3434                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3435                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3436                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3437                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3438                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3439                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3440                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3441                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3442                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3443                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3444                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3445                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3446                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3447                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3448                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3449                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3450                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3451                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3452                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3453                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3454                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3455                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3456                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3457                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3458                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3459                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3460                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3461                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3462                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3463                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3464                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3465                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3466                 </fields>
3467                 <links>
3468                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3469                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3470                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3471                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3472                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3473                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3474                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3475                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3476                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3477                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3478                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3479                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3480                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3481                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3482                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3483                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3484                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3485                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3486                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3487                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3488                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3489                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3490                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3491                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3492                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3493                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3494                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3495                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3496                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3497                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3498                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3499                 </links>
3500                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3501                         <actions>
3502                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3503                         </actions>
3504                 </permacrud>
3505         </class>
3506         <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">
3507                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3508                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3509                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3510                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3511                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3512                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3513                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3514                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3515                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3516         </fields>
3517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3518                         <actions>
3519                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3520                                 <retrieve/>
3521                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3522                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3523                         </actions>
3524                 </permacrud>
3525         </class>
3526         <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">
3527                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3528                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3529                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3530                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3531                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3532         </fields>
3533         <links>
3534                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3535                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3536                 </links>
3537                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3538                         <actions>
3539                                 <retrieve permission="RUN_REPORTS">
3540                                         <context link="usr" field="home_ou" />
3541                                 </retrieve>
3542                         </actions>
3543                 </permacrud>
3544         </class>
3545         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3546                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3547                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3548                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3549                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3550                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3551                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3552                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3553         </fields>
3554         <links>
3555                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3556                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3557                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3558                 </links>
3559                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3560                         <actions>
3561                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3562                                         <context link="usr" field="home_ou" />
3563                                         <context link="ws" field="owning_lib" />
3564                                 </retrieve>
3565                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3566                                         <context link="usr" field="home_ou" />
3567                                         <context link="ws" field="owning_lib" />
3568                                 </create>
3569                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3570                                         <context link="usr" field="home_ou" />
3571                                         <context link="ws" field="owning_lib" />
3572                                 </update>
3573                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3574                                         <context link="usr" field="home_ou" />
3575                                         <context link="ws" field="owning_lib" />
3576                                 </delete>
3577                         </actions>
3578                 </permacrud>
3579         </class>
3580         <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">
3581                 <fields oils_persist:primary="name">
3582                         <field name="name" reporter:datatype="text"/>
3583                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3584                 </fields>
3585                 <links/>
3586                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3587                         <actions>
3588                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3589                                 <retrieve/>
3590                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3591                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3592                         </actions>
3593                 </permacrud>
3594         </class>
3595         <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">
3596                 <fields oils_persist:primary="name">
3597                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3598                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3599                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3600                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3601                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3602                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3603                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3604                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3605                 </fields>
3606                 <links>
3607                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3608                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3609                 </links>
3610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3611                         <actions>
3612                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3613                                 <retrieve/>
3614                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3615                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3616                         </actions>
3617                 </permacrud>
3618         </class>
3619         <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">
3620                 <fields oils_persist:primary="name">
3621                         <field name="name" reporter:datatype="text"/>
3622                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3623                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3624                         <field name="datatype" reporter:datatype="text"/>
3625                         <field name="view_perm" reporter:datatype="link"/>
3626                         <field name="update_perm" reporter:datatype="link"/>
3627                         <field name="fm_class" reporter:datatype="text"/>
3628                         <field name="grp" reporter:datatype="link"/>
3629                 </fields>
3630                 <links>
3631                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3632                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3633                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3634                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3635                 </links>
3636                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3637                         <actions>
3638                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3639                                 <retrieve/>
3640                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3641                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3642                         </actions>
3643                 </permacrud>
3644         </class>
3645         <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">
3646                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3647                         <field name="id" />
3648                         <field name="name"  reporter:datatype="text"/>
3649                         <field name="org_unit" reporter:datatype="org_unit"/>
3650                         <field name="value"  reporter:datatype="text"/>
3651                 </fields>
3652                 <links>
3653                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3654                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3655                 </links>
3656         </class>
3657         <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">
3658                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3659                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3660                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3661                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3662                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3663                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3664                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3665                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3666                 </fields>
3667                 <links>
3668                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3669                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3670                 </links>
3671         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3672             <actions>
3673                 <create permission="CREATE_COPY_NOTE">
3674                     <context link="owning_copy" field="circ_lib"/>
3675                 </create>
3676                 <retrieve permission="VIEW_COPY_NOTES">
3677                     <context link="owning_copy" field="circ_lib"/>
3678                 </retrieve>
3679                 <update permission="UPDATE_COPY_NOTE">
3680                     <context link="owning_copy" field="circ_lib"/>
3681                 </update>
3682                 <delete permission="DELETE_COPY_NOTE">
3683                     <context link="owning_copy" field="circ_lib"/>
3684                 </delete>
3685             </actions>
3686         </permacrud>
3687         </class>
3688         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3689                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3690                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3691                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3692                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3693                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3694                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3695                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3696                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3697                 </fields>
3698                 <links>
3699                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3700                 </links>
3701         </class>
3702         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3703                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3704                         <field name="fingerprint"  reporter:datatype="text"/>
3705                         <field name="id" reporter:datatype="id" />
3706                         <field name="master_record" reporter:datatype="link"/>
3707                         <field name="mods"  reporter:datatype="text"/>
3708                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3709                 </fields>
3710                 <links>
3711                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3712                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3713                 </links>
3714         </class>
3715         <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">
3716                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3717                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3718                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3719                 </fields>
3720                 <links/>
3721         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3722             <actions>
3723                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3724                 <retrieve/>
3725                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3726                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3727             </actions>
3728         </permacrud>
3729         </class>
3730         <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">
3731                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3732                         <field name="code"  reporter:datatype="text"/>
3733                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3734                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3735                 </fields>
3736                 <links/>
3737         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3738             <actions>
3739                 <create permission="CREATE_PERM" global_required="true"/>
3740                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3741                 <update permission="UPDATE_PERM" global_required="true"/>
3742                 <delete permission="DELETE_PERM" global_required="true"/>
3743             </actions>
3744         </permacrud>
3745         </class>
3746         <class id="mmrsm" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">
3747                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3748                         <field name="id" reporter:datatype="id" />
3749                         <field name="metarecord" reporter:datatype="link"/>
3750                         <field name="source" reporter:datatype="link"/>
3751                 </fields>
3752                 <links>
3753                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3754                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3755                 </links>
3756         </class>
3757         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
3758                         oils_obj:fieldmapper="metabib::display_entry" 
3759                         oils_persist:tablename="metabib.display_entry" 
3760                         oils_persist:field_safe="true"
3761                         reporter:label="Display Field Entry" oils_persist:readonly="true">
3762                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
3763                         <field name="id" reporter:datatype="id" />
3764                         <field name="field" reporter:datatype="link"/>
3765                         <field name="source" reporter:datatype="link"/>
3766                         <field name="value"  reporter:datatype="text"/>
3767                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
3768                 </fields>
3769                 <links>
3770                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3771                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3772                 </links>
3773                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3774                         <actions>
3775                                 <retrieve/>
3776                         </actions>
3777                 </permacrud>
3778         </class>
3779         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
3780                 oils_persist:tablename="metabib.flat_display_entry"
3781                 oils_obj:fieldmapper="metabib::flat_display_entry" 
3782                 oils_persist:field_safe="true"
3783                 reporter:label="Flat Display Entry" 
3784                 oils_persist:readonly="true">
3785                 <fields>
3786                         <field name="source" reporter:datatype="id" />
3787                         <field name="name" reporter:datatype="text"/>
3788                         <field name="multi" reporter:datatype="bool"/>
3789                         <field name="label" reporter:datatype="text"/>
3790                         <field name="field" reporter:datatype="link"/>
3791                         <field name="value" reporter:datatype="text"/>
3792                 </fields>
3793                 <links>
3794                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3795                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3796                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
3797                 </links>
3798                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3799                         <actions>
3800                                 <retrieve/>
3801                         </actions>
3802                 </permacrud>
3803         </class>
3804         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
3805                 oils_persist:tablename="metabib.compressed_display_entry"
3806                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
3807                 oils_persist:field_safe="true"
3808                 reporter:label="Compressed Display Entry" 
3809                 oils_persist:readonly="true">
3810                 <fields>
3811                         <field name="source" reporter:datatype="id" />
3812                         <field name="name" reporter:datatype="text"/>
3813                         <field name="multi" reporter:datatype="bool"/>
3814                         <field name="label" reporter:datatype="text"/>
3815                         <field name="field" reporter:datatype="link"/>
3816                         <field name="value" reporter:datatype="text"/>
3817                 </fields>
3818                 <links>
3819                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3820                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3821                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
3822                 </links>
3823                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3824                         <actions>
3825                                 <retrieve/>
3826                         </actions>
3827                 </permacrud>
3828         </class>
3829         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
3830                 oils_persist:tablename="metabib.wide_display_entry"
3831                 oils_obj:fieldmapper="metabib::wide_display_entry" 
3832                 oils_persist:field_safe="true"
3833                 reporter:label="Wide Display Entry" 
3834                 oils_persist:readonly="true">
3835                 <fields oils_persist:primary="source">
3836                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
3837                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
3838                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
3839                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
3840                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
3841                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
3842                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
3843                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
3844                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
3845                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
3846                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
3847                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
3848                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
3849                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
3850                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
3851                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
3852                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
3853                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
3854                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
3855                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
3856                 </fields>
3857                 <links>
3858                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3859                 </links>
3860                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3861                         <actions>
3862                                 <retrieve/>
3863                         </actions>
3864                 </permacrud>
3865         </class>
3866
3867         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
3868                 oils_persist:tablename="config.display_field_map"
3869                 oils_obj:fieldmapper="config::display_field_map"
3870                 oils_persist:field_safe="true"
3871                 reporter:label="Display Field Map">
3872                 <fields oils_persist:primary="name">
3873                         <field name="name" reporter:datatype="text"/>
3874                         <field name="field" reporter:datatype="link"/>
3875                         <field name="multi" reporter:datatype="bool"/>
3876                 </fields>
3877                 <links>
3878                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3879                 </links>
3880                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3881                         <actions>
3882                                 <retrieve/>
3883                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
3884                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
3885                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
3886                         </actions>
3887                 </permacrud>
3888         </class>
3889
3890         <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">
3891                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3892                         <field name="id" reporter:datatype="id" />
3893                         <field name="field" reporter:datatype="link"/>
3894                         <field name="source" reporter:datatype="link"/>
3895                         <field name="value"  reporter:datatype="text"/>
3896                 </fields>
3897                 <links>
3898                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3899                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3900                 </links>
3901         </class>
3902         <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">
3903                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3904                         <field name="id" reporter:datatype="id" />
3905                         <field name="value" reporter:datatype="text"/>
3906                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3907                 </fields>
3908                 <links>
3909                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3910                 </links>
3911         </class>
3912         <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">
3913                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3914                         <field name="id" reporter:datatype="id" />
3915                         <field name="entry" reporter:datatype="link"/>
3916                         <field name="def" reporter:datatype="link"/>
3917                         <field name="source" reporter:datatype="link"/>
3918                 </fields>
3919                 <links>
3920                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3921                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3922                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3923                 </links>
3924         </class>
3925         <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">
3926                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3927                         <field name="id" reporter:datatype="id" />
3928                         <field name="entry" reporter:datatype="link"/>
3929                         <field name="simple_heading" reporter:datatype="link"/>
3930                 </fields>
3931                 <links>
3932                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3933                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3934                 </links>
3935         </class>
3936         <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">
3937                 <oils_persist:source_definition>
3938                         SELECT * FROM metabib.author_field_entry
3939                                                 UNION ALL
3940                         SELECT * FROM metabib.keyword_field_entry
3941                                                 UNION ALL
3942                         SELECT * FROM metabib.identifier_field_entry
3943                                                 UNION ALL
3944                         SELECT * FROM metabib.title_field_entry
3945                                                 UNION ALL
3946                         SELECT * FROM metabib.subject_field_entry
3947                                                 UNION ALL
3948                         SELECT * FROM metabib.series_field_entry
3949                 </oils_persist:source_definition>
3950                 <fields>
3951                         <field name="field" reporter:datatype="link"/>
3952                         <field name="id" reporter:datatype="id" />
3953                         <field name="source" reporter:datatype="link"/>
3954                         <field name="value"  reporter:datatype="text"/>
3955                 </fields>
3956                 <links>
3957                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3958                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3959                 </links>
3960         </class>
3961         <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">
3962                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3963                         <field name="field" reporter:datatype="link"/>
3964                         <field name="id" reporter:datatype="id" />
3965                         <field name="source" reporter:datatype="link"/>
3966                         <field name="value"  reporter:datatype="text"/>
3967                 </fields>
3968                 <links>
3969                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3970                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3971                 </links>
3972         </class>
3973         <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">
3974                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3975                         <field name="accepting_usr" reporter:datatype="link"/>
3976                         <field name="amount" reporter:datatype="money" />
3977                         <field name="amount_collected" reporter:datatype="money" />
3978                         <field name="cash_drawer" reporter:datatype="link"/>
3979                         <field name="id" reporter:datatype="id" />
3980                         <field name="note"  reporter:datatype="text"/>
3981                         <field name="payment_ts" reporter:datatype="timestamp"/>
3982                         <field name="xact" reporter:datatype="link"/>
3983                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3984                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3985                 </fields>
3986                 <links>
3987                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3988                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3989                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3990                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3991                 </links>
3992         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3993             <actions>
3994                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3995                     <context link="xact" jump="usr" field="home_ou"/>
3996                 </retrieve>
3997                         </actions>
3998                 </permacrud>
3999         </class>
4000         <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">
4001                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4002                         <field name="accepting_usr" reporter:datatype="link"/>
4003                         <field name="amount" reporter:datatype="money" />
4004                         <field name="amount_collected" reporter:datatype="money" />
4005                         <field name="id" reporter:datatype="id" />
4006                         <field name="note"  reporter:datatype="text"/>
4007                         <field name="payment_ts" reporter:datatype="timestamp"/>
4008                         <field name="xact" reporter:datatype="link"/>
4009                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4010                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4011                 </fields>
4012                 <links>
4013                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4014                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4015                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4016                 </links>
4017         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4018             <actions>
4019                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4020                     <context link="xact" jump="usr" field="home_ou"/>
4021                 </retrieve>
4022                         </actions>
4023                 </permacrud>
4024         </class>
4025         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4026                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4027                         <field name="accepting_usr" reporter:datatype="link"/>
4028                         <field name="amount" reporter:datatype="money" />
4029                         <field name="amount_collected" reporter:datatype="money" />
4030                         <field name="id" reporter:datatype="id" />
4031                         <field name="note"  reporter:datatype="text"/>
4032                         <field name="payment_ts" reporter:datatype="timestamp"/>
4033                         <field name="xact" reporter:datatype="link"/>
4034                         <field name="billing" reporter:datatype="link"/>
4035                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4036                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4037                 </fields>
4038                 <links>
4039                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4040                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4041                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4042                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4043                 </links>
4044         </class>
4045         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4046                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4047                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4048                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4049                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4050                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4051                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4052                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4053                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4054                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4055                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4056                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4057                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4058                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4059                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4060                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4061                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4062                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4063                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4064                 </fields>
4065                 <links>
4066                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4067                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4068                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4069                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4070                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4071                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4072                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4073                 </links>
4074         </class>
4075
4076         <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">
4077                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4078                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4079                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4080                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4081                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4082                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4083                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4084                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4085                 </fields>
4086                 <links/>
4087         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4088             <actions>
4089                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4090                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
4091                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4092                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4093             </actions>
4094         </permacrud>
4095         </class>
4096         <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">
4097                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4098                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4099                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4100                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4101                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4102                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4103                 </fields>
4104                 <links>
4105                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4106                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4107                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4108         </links>
4109         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4110             <actions>
4111                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4112                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4113                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4114                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4115             </actions>
4116         </permacrud>
4117         </class>
4118         <class id="ccs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_status" oils_persist:tablename="config.copy_status" oils_persist:restrict_primary="100" reporter:label="Copy Status" oils_persist:field_safe="true">
4119                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4120                         <field name="holdable" reporter:datatype="bool"/>
4121                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4122                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4123                         <field name="opac_visible" reporter:datatype="bool"/>
4124             <field name="copy_active" reporter:datatype="bool"/>
4125             <field name="restrict_copy_delete" reporter:datatype="bool"/>
4126             <field name="is_available" reporter:datatype="bool"/>
4127                 </fields>
4128                 <links/>
4129         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4130             <actions>
4131                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4132                 <retrieve/>
4133                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4134                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4135             </actions>
4136         </permacrud>
4137         </class>
4138         <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">
4139                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
4140                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4141                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4142                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4143                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4144                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4145                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4146                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4147                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
4148                 </fields>
4149                 <links>
4150                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4151                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4152                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4153                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4154                 </links>
4155                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4156                         <actions>
4157                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4158                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4159                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4160                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4161                         </actions>
4162                 </permacrud>
4163         </class>
4164         <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">
4165                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4166                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4167                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4168                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4169                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4170                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4171                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4172                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4173                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4174                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4175                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4176                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4177                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4178                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4179                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4180                 </fields>
4181                 <links>
4182                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4183                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4184                 </links>
4185                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4186                         <actions>
4187                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4188                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4189                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4190                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4191                         </actions>
4192                 </permacrud>
4193         </class>
4194         <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">
4195                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4196                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4197                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4198                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4199                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4200                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4201                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4202                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4203                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4204                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4205                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4206                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4207                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4208                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4209                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4210                 </fields>
4211                 <links>
4212                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4213                 </links>
4214                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4215                         <actions>
4216                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4217                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4218                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4219                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4220                         </actions>
4221                 </permacrud>
4222         </class>
4223
4224
4225         <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">
4226                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4227                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4228                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4229                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4230                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4231                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4232                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4233                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4234                 </fields>
4235                 <links>
4236                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4237                 </links>
4238         </class>
4239
4240         <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">
4241                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4242                         <field name="call_number" />
4243                         <field name="create_date" reporter:datatype="timestamp"/>
4244                         <field name="creator" reporter:datatype="link"/>
4245                         <field name="id" reporter:datatype="id" />
4246                         <field name="pub" reporter:datatype="bool"/>
4247                         <field name="title"  reporter:datatype="text"/>
4248                         <field name="value"  reporter:datatype="text"/>
4249                 </fields>
4250                 <links>
4251                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4252                 </links>
4253         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4254             <actions>
4255                 <create permission="CREATE_VOLUME_NOTE">
4256                     <context link="call_number" field="owning_lib"/>
4257                 </create>
4258                 <retrieve permission="VIEW_VOLUME_NOTES">
4259                     <context link="call_number" field="owning_lib"/>
4260                 </retrieve>
4261                 <update permission="UPDATE_VOLUME_NOTE">
4262                     <context link="call_number" field="owning_lib"/>
4263                 </update>
4264                 <delete permission="DELETE_VOLUME_NOTE">
4265                     <context link="call_number" field="owning_lib"/>
4266                 </delete>
4267             </actions>
4268         </permacrud>
4269         </class>
4270         <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">
4271                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4272                         <field name="create_date" reporter:datatype="timestamp"/>
4273                         <field name="creator" reporter:datatype="link"/>
4274                         <field name="edit_date" reporter:datatype="timestamp"/>
4275                         <field name="editor" reporter:datatype="link"/>
4276                         <field name="id" reporter:datatype="id" />
4277                         <field name="record" reporter:datatype="link"/>
4278                         <field name="value" reporter:datatype="text"/>
4279                 </fields>
4280                 <links>
4281                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4282                 </links>
4283         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4284             <actions>
4285                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4286                 <retrieve/>
4287                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4288                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4289             </actions>
4290         </permacrud>
4291         </class>
4292         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4293         <oils_persist:source_definition>
4294 SELECT  usr,
4295         SUM(
4296             CASE
4297                 WHEN (
4298                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4299                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4300                 ) THEN 1
4301                 ELSE 0
4302             END
4303         ) AS out,
4304
4305         SUM(
4306             CASE
4307                 WHEN (
4308                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4309                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4310                 ) THEN 1
4311                 ELSE 0
4312             END
4313         ) AS overdue,
4314
4315         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4316         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4317         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4318   FROM  action.circulation
4319   WHERE checkin_time IS NULL
4320   GROUP BY 1
4321         </oils_persist:source_definition>
4322         <fields oils_persist:primary="usr">
4323             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4324             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4325             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4326             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4327             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4328             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4329         </fields>
4330         <links>
4331             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4332         </links>
4333         </class>
4334         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4335         <oils_persist:source_definition>
4336 SELECT  usr,
4337         STRING_AGG(
4338             CASE
4339                 WHEN (
4340                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4341                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4342                 ) THEN id::TEXT
4343                 ELSE '0'
4344             END
4345         ,',') AS out,
4346
4347         STRING_AGG(
4348             CASE
4349                 WHEN (
4350                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4351                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4352                 ) THEN id::TEXT
4353                 ELSE '0'
4354             END
4355         ,',') AS overdue,
4356
4357         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4358         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4359         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4360   FROM  action.circulation
4361   WHERE checkin_time IS NULL
4362   GROUP BY 1
4363         </oils_persist:source_definition>
4364         <fields oils_persist:primary="usr">
4365             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4366             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4367             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4368             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4369             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4370             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4371         </fields>
4372         <links>
4373             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4374         </links>
4375         </class>
4376         <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">
4377                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4378                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4379                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4380                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4381                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4382                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4383                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4384                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4385                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4386                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4387                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4388                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4389                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4390                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4391                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4392                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4393                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4394                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4395                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4396                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4397                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4398                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4399                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4400                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4401                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4402                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4403                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4404                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4405                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4406                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4407                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4408                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4409                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4410                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4411                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4412                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4413                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4414                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4415                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4416                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4417                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4418                 </fields>
4419                 <links>
4420                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4421                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4422                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4423                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4424                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4425                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4426                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4427                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4428                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4429                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4430                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4431                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4432                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4433                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4434                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4435                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4436                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4437                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4438                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4439                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4440                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4441                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4442                 </links>
4443                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4444                         <actions>
4445                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4446                         </actions>
4447                 </permacrud>
4448         </class>
4449         <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">
4450                 <fields>
4451                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4452                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4453                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4454                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4455                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4456                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4457                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4458                 </fields>
4459                 <links>
4460                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4461                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4462                 </links>
4463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4464                         <actions>
4465                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4466                         </actions>
4467                 </permacrud>
4468         </class>
4469         <class id="aacs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_circulation_slim" oils_persist:tablename="action.all_circulation_slim" reporter:core="true" reporter:label="Combined Aged and Active circulations" oils_persist:readonly="true">
4470                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4471                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4472                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4473                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4474                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4475                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4476                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4477                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4478                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4479                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4480                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4481                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4482                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4483                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4484                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4485                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4486                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4487                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4488                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4489                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4490                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4491                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4492                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4493                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4494                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4495                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4496                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4497                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4498                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4499                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4500                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4501                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4502                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4503                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4504                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4505                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4506                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4507                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4508                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4509                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4510                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4511                 </fields>
4512                 <links>
4513                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4514                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4515                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4516                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4517                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4518                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4519                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4520                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4521                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4522                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4523                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4524                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4525                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4526                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4527                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4528                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4529                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4530                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4531                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4532                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4533                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4534                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4535                 </links>
4536                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4537                         <actions>
4538                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4539                         </actions>
4540                 </permacrud>
4541         </class>
4542
4543         <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">
4544                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4545                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4546                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4547                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4548                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4549                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4550                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4551                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4552                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4553                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4554                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4555                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4556                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4557                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4558                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4559                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4560                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4561                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4562                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4563                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4564                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4565                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4566                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4567                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4568                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4569                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4570                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4571                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4572                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4573                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4574                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4575                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4576                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4577                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4578                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4579                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4580                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4581                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4582                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4583                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4584                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4585                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4586                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4587                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4588                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4589                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4590                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4591                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4592                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4593                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4594                 </fields>
4595                 <links>
4596                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4597                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4598                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4599                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4600                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4601                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4602                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4603                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4604                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4605                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4606                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4607                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4608                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4609                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4610                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4611                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4612                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4613                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4614                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4615                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4616                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4617                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4618                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4619                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4620                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4621                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4622                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4623                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4624                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4625                 </links>
4626                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4627                         <actions>
4628                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4629                         </actions>
4630                 </permacrud>
4631         </class>
4632         <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">
4633                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4634                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4635                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4636                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4637                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4638                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4639                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4640                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4641                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4642                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4643                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4644                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4645                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4646                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4647                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4648                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4649                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4650                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4651                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4652                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4653                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4654                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4655                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4656                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4657                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4658                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4659                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4660                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4661                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4662                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4663                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4664                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4665                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4666                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4667                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4668                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4669                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4670                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4671                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4672                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4673                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4674                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4675                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4676                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4677                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4678                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4679                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4680                 </fields>
4681                 <links>
4682                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4683                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4684                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4685                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4686                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4687                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4688                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4689                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4690                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4691                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4692                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4693                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4694                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4695                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4696                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4697                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4698                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4699                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4700                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4701                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4702                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4703                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4704                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4705                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4706                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4707                 </links>
4708         </class>
4709         <class id="auch" 
4710                 controller="open-ils.cstore" 
4711                 oils_obj:fieldmapper="action::user_circ_history" 
4712                 oils_persist:tablename="action.usr_circ_history" 
4713                 reporter:label="User Checkout History">
4714                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4715                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4716                         <!-- prevent reporting on the user that owns the checkout history -->
4717                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4718                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4719                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4720                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4721                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4722                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4723                 </fields>
4724                 <links>
4725                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4726                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4727                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4728                 </links>
4729         </class>
4730         <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">
4731                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4732                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4733                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4734                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4735                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4736                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4737                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4738                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4739                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4740                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4741                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4742                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4743                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4744                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4745                 </fields>
4746                 <links>
4747                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4748                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4749                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4750                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4751                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4752                 </links>
4753                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4754                         <actions>
4755                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4756                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4757                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4758                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4759                         </actions>
4760                 </permacrud>
4761         </class>
4762
4763         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4764                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4765                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4766                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4767                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4768                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4769                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4770                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4771                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4772                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4773                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4774                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4775                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4776                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4777                 </fields>
4778                 <links>
4779                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4780                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4781                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4782                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4783                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4784                 </links>
4785                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4786                         <actions>
4787                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4788                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4789                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4790                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4791                         </actions>
4792                 </permacrud>
4793         </class>
4794         
4795         <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">
4796                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4797                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4798                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4799                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4800                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4801                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4802                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4803                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4804                 </fields>
4805                 <links>
4806                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4807                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4808                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4809                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4810                 </links>
4811                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4812                         <actions>
4813                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4814                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4815                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4816                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4817                         </actions>
4818                 </permacrud>
4819         </class>
4820         
4821         <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">
4822                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4823                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4824                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4825                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4826                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4827                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4828                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4829                 </fields>
4830                 <links>
4831                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4832                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4833                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4834                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4835                 </links>
4836                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4837                         <actions>
4838                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4839                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4840                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4841                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4842                         </actions>
4843                 </permacrud>
4844         </class>
4845         
4846         <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">
4847                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4848                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4849                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4850                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4851                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4852                 </fields>
4853                 <links>
4854                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4855                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4856                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4857                 </links>
4858                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4859                         <actions>
4860                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4861                     <context link="resource" field="owner" />
4862                 </create>
4863                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4864                     <context link="resource" field="owner" />
4865                 </retrieve>
4866                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4867                     <context link="resource" field="owner" />
4868                 </update>
4869                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4870                     <context link="resource" field="owner" />
4871                 </delete>
4872                         </actions>
4873                 </permacrud>
4874         </class>
4875         
4876         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4877                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4878                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4879                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4880                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4881                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4882                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4883                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4884                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4885                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4886                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4887                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4888                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4889                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4890                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4891                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4892                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4893                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4894                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4895                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4896                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4897                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4898                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4899                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4900                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4901                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4902                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4903                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4904                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4905                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4906                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4907                 </fields>
4908                 <links>
4909                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4910                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4911                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4912                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4913                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4914                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4915                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4916                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4917                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4918                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4919                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4920                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4921                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4922                 </links>
4923                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4924                         <actions>
4925                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4926                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4927                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4928                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4929                         </actions>
4930                 </permacrud>
4931         </class>
4932         
4933         <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">
4934                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4935                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4936                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4937                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4938                 </fields>
4939                 <links>
4940                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4941                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4942                 </links>
4943                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4944                         <actions>
4945                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4946                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4947                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4948                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4949                         </actions>
4950                 </permacrud>
4951         </class>
4952
4953         <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">
4954                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4955                         <field name="bucket" reporter:datatype="link"/>
4956                         <field name="id" reporter:datatype="id" />
4957                         <field name="target_call_number" reporter:datatype="link" />
4958                         <field name="create_time" reporter:datatype="timestamp" />
4959                         <field name="pos" reporter:datatype="int" />
4960                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4961                 </fields>
4962                 <links>
4963                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4964                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4965             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4966                 </links>
4967                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4968                         <actions>
4969                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
4970                     <context link="bucket" owning_lib="owning_lib"/>
4971                 </retrieve>
4972             </actions>
4973         </permacrud>
4974         </class>
4975         <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">
4976                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4977                         <field name="id" reporter:datatype="id" />
4978                         <field name="item" reporter:datatype="link"/>
4979                         <field name="note" reporter:datatype="text" />
4980                 </fields>
4981                 <links>
4982                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4983                 </links>
4984         </class>
4985         <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">
4986                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4987                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4988                         <field name="btype" reporter:datatype="text"/>
4989                         <field name="id" reporter:datatype="id" />
4990                         <field name="name" reporter:datatype="text"/>
4991                         <field name="description" reporter:datatype="text"/>
4992                         <field name="owner" reporter:datatype="link"/>
4993                         <field name="pub" reporter:datatype="bool"/>
4994                         <field name="create_time" reporter:datatype="timestamp" />
4995                         <field name="owning_lib" reporter:datatype="org_unit" />
4996                 </fields>
4997                 <links>
4998                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4999                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5000                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5001                 </links>
5002                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5003                         <actions>
5004                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5005                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5006                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5007                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5008                         </actions>
5009                 </permacrud>
5010         </class>
5011         <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">
5012                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5013                         <field name="id" reporter:datatype="id" />
5014                         <field name="bucket" reporter:datatype="link"/>
5015                         <field name="note" reporter:datatype="text" />
5016                 </fields>
5017                 <links>
5018                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5019                 </links>
5020         </class>
5021         <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">
5022                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5023                         <field name="hold" reporter:datatype="link"/>
5024                         <field name="id" reporter:datatype="id" />
5025                         <field name="target_copy" reporter:datatype="link"/>
5026                         <field name="proximity" reporter:datatype="number"/>
5027                 </fields>
5028                 <links>
5029                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5030                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5031                 </links>
5032         </class>
5033         <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">
5034                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5035                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5036                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5037                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5038                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5039                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5040                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5041                 </fields>
5042                 <links>
5043                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5044                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5045                 </links>
5046         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5047             <actions>
5048                 <create permission="CREATE_HOLD_NOTIFICATION">
5049                                         <context link="hold" jump="usr" field="home_ou" />
5050                                 </create>
5051                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5052                                         <context link="hold" jump="usr" field="home_ou" />
5053                                 </retrieve>
5054                 <update permission="CREATE_HOLD_NOTIFICATION">
5055                                         <context link="hold" jump="usr" field="home_ou" />
5056                                 </update>
5057                 <delete permission="CREATE_HOLD_NOTIFICATION">
5058                                         <context link="hold" jump="usr" field="home_ou" />
5059                                 </delete>
5060             </actions>
5061         </permacrud>
5062         </class>
5063         <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Copy/Shelving Location"  oils_persist:field_safe="true">
5064                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5065                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5066                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5067                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5068                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5069                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5070                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5071                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5072                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5073                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5074                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5075                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5076                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5077                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5078                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5079                 </fields>
5080                 <links>
5081                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5082                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5083                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5084                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5085                 </links>
5086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5087             <actions>
5088                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5089                 <retrieve/>
5090                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5091                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5092             </actions>
5093         </permacrud>
5094         </class>
5095         <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">
5096                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5097                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5098                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5099                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5100                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
5101             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5102             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5103             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5104                 </fields>
5105                 <links>
5106                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5107                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5108                 </links>
5109         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5110             <actions>
5111                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5112                 <retrieve/>
5113                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5114                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5115             </actions>
5116         </permacrud>
5117         </class>
5118         <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">
5119                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5120                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5121             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5122             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5123                 </fields>
5124                 <links>
5125                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5126                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5127                 </links>
5128         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5129             <actions>
5130                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5131                                         <context link="lgroup" field="owner" />
5132                 </create>
5133                 <retrieve/>
5134                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5135                                         <context link="lgroup" field="owner" />
5136                 </update>
5137                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5138                                         <context link="lgroup" field="owner" />
5139                 </delete>
5140             </actions>
5141         </permacrud>
5142         </class>
5143
5144     <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">
5145         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5146             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5147             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5148             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5149             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5150         </fields>
5151         <links>
5152             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5153             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5154         </links>
5155         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5156             <actions>
5157                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5158                 <retrieve/>
5159                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5160                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5161             </actions>
5162         </permacrud>
5163     </class>
5164
5165         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5166                 <fields>
5167                         <field name="sre_id" oils_persist:virtual="true" />
5168                         <field name="location" oils_persist:virtual="true" />
5169                         <field name="owning_lib" oils_persist:virtual="true" />
5170                         <field name="basic_holdings" oils_persist:virtual="true" />
5171                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5172                         <field name="supplement_holdings" oils_persist:virtual="true" />
5173                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5174                         <field name="index_holdings" oils_persist:virtual="true" />
5175                         <field name="index_holdings_add" oils_persist:virtual="true" />
5176                         <field name="online" oils_persist:virtual="true" />
5177                         <field name="missing" oils_persist:virtual="true" />
5178                         <field name="incomplete" oils_persist:virtual="true" />
5179                 </fields>
5180         </class>
5181
5182         <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">
5183                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5184                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5185                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5186                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5187                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5188                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5189                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5190                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5191                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5192                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5193                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5194                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5195                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5196                 </fields>
5197                 <links>
5198                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5199                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5200                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5201                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5202                 </links>
5203                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5204                         <actions>
5205                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5206                                 <retrieve/>
5207                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5208                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5209                         </actions>
5210                 </permacrud>
5211         </class>
5212
5213         <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">
5214                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5215                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5216                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5217                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5218                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5219                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5220                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5221                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5222                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5223                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5224                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5225                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5226                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5227                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5228                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5229                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5230                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5231                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5232                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5233                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5234                 </fields>
5235                 <links>
5236                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5237                 </links>
5238                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5239                         <actions>
5240                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5241                                         <context link="subscription" field="owning_lib" />
5242                                 </create>
5243                                 <retrieve />
5244                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5245                                         <context link="subscription" field="owning_lib" />
5246                                 </update>
5247                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5248                                         <context link="subscription" field="owning_lib" />
5249                                 </delete>
5250                         </actions>
5251                 </permacrud>
5252         </class>
5253
5254         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5255                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5256                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5257                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5258                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5259                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5260                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5261                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5262                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5263                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5264                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5265                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5266                 </fields>
5267                 <links>
5268                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5269                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5270                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5271                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5272                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5273                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5274                 </links>
5275                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5276                         <actions>
5277                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5278                                 <retrieve />
5279                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5280                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5281                         </actions>
5282                 </permacrud>
5283         </class>
5284
5285         <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">
5286                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5287                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5288                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5289                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5290                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5291                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5292                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5293                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5294                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5295                 </fields>
5296                 <links>
5297                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5298                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5299                 </links>
5300                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5301                         <actions>
5302                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5303                     <context link="subscription" field="owning_lib"/>
5304                 </create>
5305                                 <retrieve />
5306                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5307                     <context link="subscription" field="owning_lib"/>
5308                 </update>
5309                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5310                     <context link="subscription" field="owning_lib"/>
5311                 </delete>
5312                         </actions>
5313                 </permacrud>
5314         </class>
5315
5316         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5317                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5318                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5319                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5320                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5321                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5322                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5323                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5324                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5325                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5326                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5327                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5328                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5329                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5330                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5331                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5332                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5333                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5334                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5335                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5336                 </fields>
5337                 <links>
5338                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5339                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5340                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5341                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5342                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5343                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5344                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5345                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5346                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5347                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5348                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5349                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5350                 </links>
5351                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5352                         <actions>
5353                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5354                                 <retrieve />
5355                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5356                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5357                         </actions>
5358                 </permacrud>
5359         </class>
5360
5361         <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">
5362                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5363                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5364                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5365                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5366                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5367                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5368                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5369                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5370                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5371                 </fields>
5372                 <links>
5373                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5374                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5375                 </links>
5376                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5377                         <actions>
5378                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5379                                         <context link="distribution" field="holding_lib" />
5380                                 </create>
5381                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5382                                         <context link="distribution" field="holding_lib" />
5383                                 </retrieve>
5384                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5385                                         <context link="distribution" field="holding_lib" />
5386                                 </update>
5387                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5388                                         <context link="distribution" field="holding_lib" />
5389                                 </delete>
5390                         </actions>
5391                 </permacrud>
5392         </class>
5393
5394         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5395                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5396                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5397                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5398                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5399                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5400                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5401                 </fields>
5402                 <links>
5403                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5404                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5405                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5406                 </links>
5407                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5408                         <actions>
5409                                 <create permission="ADMIN_SERIAL_STREAM">
5410                                         <context link="distribution" field="holding_lib" />
5411                                 </create>
5412                                 <retrieve />
5413                                 <update permission="ADMIN_SERIAL_STREAM">
5414                                         <context link="distribution" field="holding_lib" />
5415                                 </update>
5416                                 <delete permission="ADMIN_SERIAL_STREAM">
5417                                         <context link="distribution" field="holding_lib" />
5418                                 </delete>
5419                         </actions>
5420                 </permacrud>
5421         </class>
5422
5423         <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">
5424                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5425                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5426                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5427                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5428                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5429                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5430                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5431                 </fields>
5432                 <links>
5433                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5434                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5435                 </links>
5436                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5437                         <actions>
5438                                 <create permission="ADMIN_SERIAL_STREAM">
5439                                         <context link="stream" jump="distribution" field="holding_lib" />
5440                                 </create>
5441                                 <retrieve permission="RECEIVE_SERIAL">
5442                                         <context link="stream" jump="distribution" field="holding_lib" />
5443                                 </retrieve>
5444                                 <update permission="ADMIN_SERIAL_STREAM">
5445                                         <context link="stream" jump="distribution" field="holding_lib" />
5446                                 </update>
5447                                 <delete permission="ADMIN_SERIAL_STREAM">
5448                                         <context link="stream" jump="distribution" field="holding_lib" />
5449                                 </delete>
5450                         </actions>
5451                 </permacrud>
5452         </class>
5453
5454         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5455                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5456                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5457                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5458                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5459                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5460                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5461                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5462                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5463                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5464                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5465                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5466                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5467                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5468                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5469                 </fields>
5470                 <links>
5471                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5472                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5473                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5474                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5475                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5476                 </links>
5477                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5478                         <actions>
5479                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5480                                         <context link="subscription" field="owning_lib" />
5481                                 </create>
5482                                 <retrieve/>
5483                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5484                                         <context link="subscription" field="owning_lib" />
5485                                 </update>
5486                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5487                                         <context link="subscription" field="owning_lib" />
5488                                 </delete>
5489                         </actions>
5490                 </permacrud>
5491         </class>
5492
5493         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5494                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5495                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5496                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5497                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5498                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5499                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5500                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5501                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5502                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5503                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5504                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5505                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5506                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5507                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5508                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5509                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5510                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5511                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5512                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5513                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5514                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5515                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5516                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5517                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5518                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5519                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5520                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5521                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5522                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5523                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5524                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5525                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5526                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5527                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5528                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5529                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5530                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5531                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5532                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5533                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5534                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5535                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5536                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5537                 </fields>
5538                 <links>
5539                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5540                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5541                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5542                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5543                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5544                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5545                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5546                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5547                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5548                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5549                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5550                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5551                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5552                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5553                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5554                 </links>
5555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5556                         <actions>
5557                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5558                                 <retrieve/>
5559                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5560                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5561                         </actions>
5562                 </permacrud>
5563         </class>
5564
5565         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5566                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5567                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5568                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5569                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5570                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5571                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5572                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5573                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5574                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5575                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5576                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5577                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5578                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5579                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5580                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5581                 </fields>
5582                 <links>
5583                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5584                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5585                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5586                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5587                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5588                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5589                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5590                 </links>
5591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5592                         <actions>
5593                                 <create permission="ADMIN_SERIAL_ITEM">
5594                                         <context link="stream" jump="distribution" field="holding_lib" />
5595                                 </create>
5596                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5597                                         <context link="stream" jump="distribution" field="holding_lib" />
5598                                 </retrieve>
5599                                 <update permission="ADMIN_SERIAL_ITEM">
5600                                         <context link="stream" jump="distribution" field="holding_lib" />
5601                                 </update>
5602                                 <delete permission="ADMIN_SERIAL_ITEM">
5603                                         <context link="stream" jump="distribution" field="holding_lib" />
5604                                 </delete>
5605                         </actions>
5606                 </permacrud>
5607         </class>
5608
5609         <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">
5610                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5611                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5612                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5613                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5614                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5615                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5616                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5617                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5618                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5619                 </fields>
5620                 <links>
5621                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5622                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5623                 </links>
5624                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5625                         <actions>
5626                                 <create permission="ADMIN_SERIAL_ITEM">
5627                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5628                                 </create>
5629                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5630                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5631                                 </retrieve>
5632                                 <update permission="ADMIN_SERIAL_ITEM">
5633                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5634                                 </update>
5635                                 <delete permission="ADMIN_SERIAL_ITEM">
5636                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5637                                 </delete>
5638                         </actions>
5639                 </permacrud>
5640         </class>
5641         <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">
5642                 <fields>
5643                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5644                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5645                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5646                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5647                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5648                 </fields>
5649                 <links>
5650                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5651                 </links>
5652         </class>
5653         <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">
5654                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5655                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5656                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5657                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5658                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5659                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5660                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5661                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5662                 </fields>
5663                 <links>
5664                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5665                 </links>
5666         </class>
5667         <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">
5668                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5669                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5670                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5671                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5672                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5673                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5674                 </fields>
5675                 <links>
5676                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5677                 </links>
5678                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5679                         <actions>
5680                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5681                                         <context link="distribution" field="holding_lib" />
5682                                 </create>
5683                                 <retrieve/>
5684                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5685                                         <context link="distribution" field="holding_lib" />
5686                                 </update>
5687                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5688                                         <context link="distribution" field="holding_lib" />
5689                                 </delete>
5690                         </actions>
5691                 </permacrud>
5692         </class>
5693
5694         <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">
5695                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5696                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5697                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5698                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5699                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5700                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5701                 </fields>
5702                 <links>
5703                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5704                 </links>
5705                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5706                         <actions>
5707                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5708                                         <context link="distribution" field="holding_lib" />
5709                                 </create>
5710                                 <retrieve/>
5711                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5712                                         <context link="distribution" field="holding_lib" />
5713                                 </update>
5714                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5715                                         <context link="distribution" field="holding_lib" />
5716                                 </delete>
5717                         </actions>
5718                 </permacrud>
5719         </class>
5720
5721         <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">
5722                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5723                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5724                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5725                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5726                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5727                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5728                 </fields>
5729                 <links>
5730                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5731                 </links>
5732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5733                         <actions>
5734                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5735                                         <context link="distribution" field="holding_lib" />
5736                                 </create>
5737                                 <retrieve/>
5738                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5739                                         <context link="distribution" field="holding_lib" />
5740                                 </update>
5741                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5742                                         <context link="distribution" field="holding_lib" />
5743                                 </delete>
5744                         </actions>
5745                 </permacrud>
5746         </class>
5747
5748         <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">
5749                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
5750                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5751                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5752                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
5753                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
5754                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
5755                 </fields>
5756                 <links>
5757                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5758                 </links>
5759                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5760                         <actions>
5761                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5762                                 <retrieve/>
5763                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5764                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5765                         </actions>
5766                 </permacrud>
5767         </class>
5768
5769         <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">
5770                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5771                         <field name="id" reporter:datatype="id" />
5772                         <field name="owning_copy" reporter:datatype="link"/>
5773                         <field name="stat_cat" reporter:datatype="link"/>
5774                         <field name="stat_cat_entry" reporter:datatype="link"/>
5775                 </fields>
5776                 <links>
5777                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5778                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5779                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5780                 </links>
5781                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5782                         <actions>
5783                                 <retrieve/>
5784                         </actions>
5785                 </permacrud>
5786         </class>
5787         <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">
5788                 <fields oils_persist:primary="code">
5789                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5790                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5791                 </fields>
5792                 <links/>
5793         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5794             <actions>
5795                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5796                 <retrieve/>
5797                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5798                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5799             </actions>
5800         </permacrud>
5801         </class>
5802         <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">
5803                 <fields oils_persist:primary="code">
5804                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5805                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5806                 </fields>
5807                 <links/>
5808         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5809             <actions>
5810                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5811                 <retrieve/>
5812                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5813                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5814             </actions>
5815         </permacrud>
5816         </class>
5817         <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">
5818                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5819                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5820                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5821                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5822                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5823                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5824                 </fields>
5825                 <links>
5826             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5827         </links>
5828         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5829             <actions>
5830                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5831                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5832                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5833                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5834             </actions>
5835         </permacrud>
5836         </class>
5837         <class id="lasso" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso" oils_persist:tablename="actor.org_lasso" reporter:label="Org Lasso">
5838                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5839                         <field name="id" reporter:datatype="id" />
5840                         <field name="name" reporter:datatype="text"/>
5841                 </fields>
5842                 <links/>
5843         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5844             <actions>
5845                 <create permission="CREATE_LASSO" global_required="true"/>
5846                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5847                 <update permission="UPDATE_LASSO" global_required="true"/>
5848                 <delete permission="DELETE_LASSO" global_required="true"/>
5849             </actions>
5850         </permacrud>
5851         </class>
5852         <class id="lmap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso_map" oils_persist:tablename="actor.org_lasso_map" reporter:label="Org Lasso Map">
5853                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5854                         <field name="id" reporter:datatype="id" />
5855                         <field name="lasso" reporter:datatype="link"/>
5856                         <field name="org_unit" reporter:datatype="org_unit"/>
5857                 </fields>
5858                 <links>
5859                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5860                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5861                 </links>
5862         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5863             <actions>
5864                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5865                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5866                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5867                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5868             </actions>
5869         </permacrud>
5870         </class>
5871         <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">
5872                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5873                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5874                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5875                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5876                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5877                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5878                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5879                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5880                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5881                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5882                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5883                 </fields>
5884                 <links>
5885                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5886                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5887                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5888                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5889                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5890                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5891                 </links>
5892         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5893             <actions>
5894                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5895                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5896                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5897                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5898             </actions>
5899         </permacrud>
5900         </class>
5901         <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">
5902                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5903                         <field name="id" reporter:datatype="id" />
5904                         <field name="from_org" reporter:datatype="org_unit"/>
5905                         <field name="to_org" reporter:datatype="org_unit"/>
5906                         <field name="prox" reporter:datatype="int" />
5907                 </fields>
5908                 <links>
5909                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5910                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5911                 </links>
5912         </class>
5913         <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">
5914                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5915                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5916                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5917                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5918                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5919                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5920                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5921                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5922                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5923                 </fields>
5924                 <links/>
5925         </class>
5926         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5927                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5928                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5929                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5930                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5931                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5932                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5933                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5934                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5935                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5936                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5937                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5938                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5939                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5940                 </fields>
5941                 <links>
5942                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5943                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5944                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5945                 </links>
5946         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5947             <actions>
5948                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5949                 <retrieve/>
5950                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5951                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5952             </actions>
5953         </permacrud>
5954         </class>
5955         <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">
5956                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5957                         <field name="address_type"  reporter:datatype="text"/>
5958                         <field name="city"  reporter:datatype="text"/>
5959                         <field name="country"  reporter:datatype="text"/>
5960                         <field name="county"  reporter:datatype="text"/>
5961                         <field name="id" reporter:datatype="id" />
5962                         <field name="org_unit" reporter:datatype="org_unit"/>
5963                         <field name="post_code"  reporter:datatype="text"/>
5964                         <field name="state"  reporter:datatype="text"/>
5965                         <field name="street1"  reporter:datatype="text"/>
5966                         <field name="street2"  reporter:datatype="text"/>
5967                         <field name="valid" reporter:datatype="bool"/>
5968                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5969                 </fields>
5970                 <links>
5971                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5972                 </links>
5973         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5974             <actions>
5975                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5976                 <retrieve/>
5977                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5978                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5979             </actions>
5980         </permacrud>
5981         </class>
5982         <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">
5983                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5984                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5985                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5986                         <field name="query_text" reporter:datatype="text"/>
5987                 </fields>
5988         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5989             <actions>
5990                 <retrieve/>
5991             </actions>
5992         </permacrud>
5993         </class>
5994
5995         <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">
5996                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5997                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5998                         <field name="owner" reporter:datatype="org_unit"/>
5999                         <field name="code" reporter:datatype="text"/>
6000                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6001                         <field name="create_date" reporter:datatype="timestamp"/>
6002                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6003                 </fields>
6004                 <links>
6005                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6006                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6007                 </links>
6008         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6009             <actions>
6010                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6011                 <retrieve/>
6012                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6013                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6014             </actions>
6015         </permacrud>
6016         </class>
6017         <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">
6018                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6019                         <field name="id" reporter:datatype="id"/>
6020                         <field name="grp" reporter:datatype="link"/>
6021                         <field name="pos" reporter:datatype="int"/>
6022                         <field name="query" reporter:datatype="link"/>
6023                 </fields>
6024                 <links>
6025                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6026                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6027                 </links>
6028         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6029             <actions>
6030                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6031                     <context link="grp" field="owner"/>
6032                 </create>
6033                 <retrieve/>
6034                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6035                     <context link="grp" field="owner"/>
6036                 </update>
6037                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6038                     <context link="grp" field="owner"/>
6039                 </delete>
6040             </actions>
6041         </permacrud>
6042         </class>
6043
6044         <!-- A note: Please update alhr and ahopl when updating ahr -->
6045         <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">
6046                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6047                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6048                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6049                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6050                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6051                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6052                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6053                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6054                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6055                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6056                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6057                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6058                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6059                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6060                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6061                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6062                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6063                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6064                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6065                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6066                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6067                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6068                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6069                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6070                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6071                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6072                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6073                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6074                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6075                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6076                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6077                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6078                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6079                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6080                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6081                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6082                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6083                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6084                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6085                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6086                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6087                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6088                 </fields>
6089                 <links>
6090                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6091                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6092                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6093                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6094                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6095                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6096                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6097                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6098                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6099                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6100                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6101                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6102                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6103                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6104                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6105                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6106                 </links>
6107                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6108                         <actions>
6109                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6110                         </actions>
6111                 </permacrud>
6112         </class>
6113         <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">
6114                 <oils_persist:source_definition><![CDATA[
6115                 SELECT
6116                         ahr.*,
6117                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6118                                 copy_location_order_position,
6119                         CASE WHEN au.alias IS NOT NULL THEN
6120                                 au.alias
6121                         ELSE
6122                                 au.first_given_name
6123                         END AS usr_alias_or_first_given_name,
6124                         au.first_given_name AS usr_first_given_name,
6125                         au.second_given_name AS usr_second_given_name,
6126                         au.family_name AS usr_family_name,
6127                         au.prefix AS usr_prefix,
6128                         au.suffix AS usr_suffix,
6129                         au.alias AS usr_alias,
6130                         CASE WHEN au.alias IS NOT NULL THEN
6131                                 au.alias
6132                         ELSE
6133                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6134                                         COALESCE(au.family_name, ''),
6135                                         COALESCE(au.suffix, ''),
6136                                         ', ',
6137                                         COALESCE(au.prefix, ''),
6138                                         COALESCE(au.first_given_name, ''),
6139                                         COALESCE(au.second_given_name, '')
6140                                 ], ' '), E'\\s+,', ',')
6141                         END AS usr_alias_or_display_name,
6142                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6143                                 COALESCE(au.family_name, ''),
6144                                 COALESCE(au.suffix, ''),
6145                                 ', ',
6146                                 COALESCE(au.prefix, ''),
6147                                 COALESCE(au.first_given_name, ''),
6148                                 COALESCE(au.second_given_name, '')
6149                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6150                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6151                                 AS call_number_label,
6152                         siss.label AS issuance_label,
6153                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6154                         ahcm_1.copy_count AS potential_copies
6155                 FROM action.hold_request ahr
6156                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6157                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6158                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6159                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6160                 JOIN actor.usr au ON (au.id = ahr.usr)
6161                 JOIN (
6162                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6163                         FROM asset.copy_location
6164                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6165                 LEFT JOIN actor.usr_standing_penalty ausp 
6166                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6167                 LEFT JOIN config.standing_penalty csp
6168                         ON (
6169                                 csp.id = ausp.standing_penalty AND 
6170                                 csp.block_list LIKE '%CAPTURE%' AND (
6171                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6172                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6173                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6174                                         )
6175                                 )
6176                         )
6177                 JOIN (
6178                         SELECT COUNT(target_copy) AS copy_count, hold
6179                         FROM action.hold_copy_map
6180                         GROUP BY 2
6181                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6182                 LEFT JOIN serial.issuance siss
6183                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6184                 LEFT JOIN asset.copy_location_order acplo
6185                         ON (acp.location = acplo.location AND
6186                                 acp.circ_lib = acplo.org)
6187                 WHERE
6188                         ahr.capture_time IS NULL AND
6189                         ahr.cancel_time IS NULL AND
6190                         csp.id IS NULL AND
6191                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6192                         acp.status IN (0,7)
6193                 ]]></oils_persist:source_definition>
6194                 <fields oils_persist:primary="id">
6195                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6196                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6197                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6198                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6199                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6200                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6201                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6202                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6203                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6204                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6205                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6206                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6207                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6208                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6209                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6210                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6211                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6212                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6213                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6214                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6215                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6216                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6217                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6218                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6219                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6220                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6221                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6222                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6223                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6224                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6225                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6226                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6227                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6228                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6229                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6230                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6231                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6232                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6233                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6234                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6235                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6236                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6237                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6238                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6239                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6240                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6241                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6242                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6243                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6244                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6245                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6246                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6247                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6248                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6249                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6250                 </fields>
6251                 <links>
6252                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6253                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6254                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6255                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6256                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6257                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6258                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6259                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6260                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6261                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6262                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6263                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6264                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6265                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6266                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6267                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6268                 </links>
6269                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6270                         <actions>
6271                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6272                         </actions>
6273                 </permacrud>
6274         </class>
6275         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6276                 <oils_persist:source_definition>
6277                         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)
6278                 </oils_persist:source_definition>
6279                 <fields oils_persist:primary="id">
6280                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6281                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6282                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6283                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6284                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6285                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6286                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6287                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6288                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6289                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6290                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6291                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6292                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6293                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6294                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6295                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6296                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6297                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6298                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6299                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6300                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6301                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6302                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6303                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6304                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6305                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6306                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6307                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6308                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6309                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6310                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6311                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6312                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6313                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6314                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6315                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6316                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6317                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6318                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6319                 </fields>
6320                 <links>
6321                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6322                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6323                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6324                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6325                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6326                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6327                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6328                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6329                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6330                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6331                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6332                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6333                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6334                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6335                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6336                 </links>
6337         </class>
6338
6339         <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">
6340                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6341                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6342                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6343                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6344                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6345                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6346                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6347                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6348                 </fields>
6349                 <links>
6350                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6351                 </links>
6352                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6353                         <actions>
6354                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6355                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6356                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6357                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6358                         </actions>
6359                 </permacrud>
6360         </class>
6361         <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">
6362                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6363                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6364                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6365                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6366                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6367                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6368                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6369                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6370                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6371                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6372                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6373                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6374                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6375                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6376                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6377                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6378                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6379                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6380                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6381                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6382                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6383                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6384                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6385                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6386                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6387                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6388                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6389                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6390                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6391                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6392                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6393                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6394                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6395                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6396                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6397                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6398                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6399                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6400                 </fields>
6401                 <links>
6402                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6403                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6404                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6405                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6406                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6407                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6408                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6409                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6410                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6411                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6412                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6413                 </links>
6414                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6415                         <actions>
6416                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6417                         </actions>
6418                 </permacrud>
6419         </class>
6420         <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">
6421                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6422                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6423                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6424                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6425                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6426                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6427                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6428                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6429                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6430                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6431                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6432                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6433                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6434                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6435                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6436                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6437                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6438                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6439                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6440                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6441                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6442                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6443                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6444                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6445                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6446                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6447                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6448                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6449                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6450                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6451                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6452                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6453                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6454                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6455                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6456                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6457                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6458                 </fields>
6459                 <links>
6460                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6461                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6462                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6463                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6464                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6465                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6466                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6467                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6468                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6469                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6470                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6471                 </links>
6472                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6473                         <actions>
6474                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6475                         </actions>
6476                 </permacrud>
6477         </class>
6478
6479         <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">
6480                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6481                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6482                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6483                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6484                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6485                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6486                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6487                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6488                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6489                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6490                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6491                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6492                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6493                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6494                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6495                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6496                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6497                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6498                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6499                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6500                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6501                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6502                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6503                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6504                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6505                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6506                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6507                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6508                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6509                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6510                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6511                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6512                 </fields>
6513                 <links>
6514                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6515                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6516                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6517                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6518                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6519                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6520                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6521                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6522                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6523                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6524                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6525                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6526                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6527                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6528                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6529                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6530                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6531                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6532                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6533                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6534                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6535                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6536                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6537                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6538                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6539                 </links>
6540         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6541             <actions>
6542                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6543                 <retrieve />
6544                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6545                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6546             </actions>
6547         </permacrud>
6548         </class>
6549         <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">
6550                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6551                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6552                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6553                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6554                 </fields>
6555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6556                         <actions>
6557                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6558                                 <retrieve/>
6559                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6560                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6561                         </actions>
6562                 </permacrud>
6563         </class>
6564         <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">
6565                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6566                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6567                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6568                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6569                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6570                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6571                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6572                 </fields>
6573                 <links>
6574                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6575                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6576                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6577                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6578                 </links>
6579                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6580                         <actions>
6581                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6582                                 <retrieve/>
6583                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6584                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6585                         </actions>
6586                 </permacrud>
6587         </class>
6588         <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">
6589                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6590                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6591                         <field name="btype" reporter:datatype="text"/>
6592                         <field name="id" reporter:datatype="id" />
6593                         <field name="name"  reporter:datatype="text"/>
6594                         <field name="description" reporter:datatype="text"/>
6595                         <field name="owner" reporter:datatype="link"/>
6596                         <field name="pub" reporter:datatype="bool"/>
6597                         <field name="create_time" reporter:datatype="timestamp" />
6598                         <field name="owning_lib" reporter:datatype="org_unit" />
6599                 </fields>
6600                 <links>
6601                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6602                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6603                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6604                 </links>
6605                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6606                         <actions>
6607                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6608                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6609                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6610                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6611                         </actions>
6612                 </permacrud>
6613         </class>
6614         <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">
6615                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6616                         <field name="id" reporter:datatype="id" />
6617                         <field name="bucket" reporter:datatype="link"/>
6618                         <field name="note" reporter:datatype="text" />
6619                 </fields>
6620                 <links>
6621                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6622                 </links>
6623         </class>
6624         <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">
6625                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6626                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6627                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6628                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6629                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6630                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6631                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6632                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6633                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6634                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6635                 </fields>
6636                 <links>
6637                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6638                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6639                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6640                 </links>
6641                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6642                         <actions>
6643                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6644                         </actions>
6645                 </permacrud>
6646         </class>
6647         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6648                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6649                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6650                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6651                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6652                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6653                 </fields>
6654                 <links>
6655                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6656                 </links>
6657                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6658                         <actions>
6659                                 <retrieve permission="VIEW_USER">
6660                                         <context link="usr" field="home_ou" />
6661                                 </retrieve>
6662                         </actions>
6663                 </permacrud>
6664         </class>
6665     <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">
6666         <fields oils_persist:primary="field">
6667             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6668             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6669             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6670         </fields>
6671         <links/>
6672         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6673             <actions>
6674                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6675                 <retrieve />
6676                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6677                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6678             </actions>
6679         </permacrud>
6680     </class>
6681         <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">
6682                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6683                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6684                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6685                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6686                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6687                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6688                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6689                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6690                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6691                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6692                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6693                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6694                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6695                 </fields>
6696                 <links>
6697                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6698                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6699                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6700                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6701                 </links>
6702         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6703             <actions>
6704                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6705                 <retrieve />
6706                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6707                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6708             </actions>
6709         </permacrud>
6710         </class>
6711         <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">
6712                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6713                         <field name="field" reporter:datatype="link"/>
6714                         <field name="id" reporter:datatype="id" />
6715                         <field name="source" reporter:datatype="link"/>
6716                         <field name="value"  reporter:datatype="text"/>
6717                 </fields>
6718                 <links>
6719                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6720                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6721                 </links>
6722         </class>
6723         <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">
6724                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6725                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6726                         <field name="btype" reporter:datatype="text"/>
6727                         <field name="id" reporter:datatype="id" />
6728                         <field name="name"  reporter:datatype="text"/>
6729                         <field name="description" reporter:datatype="text"/>
6730                         <field name="owner" reporter:datatype="link"/>
6731                         <field name="pub" reporter:datatype="bool"/>
6732                         <field name="create_time" reporter:datatype="timestamp" />
6733                         <field name="owning_lib" reporter:datatype="org_unit" />
6734                 </fields>
6735                 <links>
6736                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6737                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6738                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6739                 </links>
6740                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6741                         <actions>
6742                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6743                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6744                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6745                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6746                         </actions>
6747                 </permacrud>
6748         </class>
6749         <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">
6750                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6751                         <field name="id" reporter:datatype="id" />
6752                         <field name="bucket" reporter:datatype="link"/>
6753                         <field name="note" reporter:datatype="text" />
6754                 </fields>
6755                 <links>
6756                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6757                 </links>
6758         </class>
6759         <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">
6760                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6761                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6762                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6763                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6764                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6765                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6766                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6767                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6768                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6769                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6770                 </fields>
6771                 <links>
6772                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6773                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6774                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6775                 </links>
6776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6777             <actions>
6778                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6779                     <context link="xact" jump="usr" field="home_ou"/>
6780                 </retrieve>
6781                         </actions>
6782                 </permacrud>
6783         </class>
6784         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6785                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6786                         <field name="id" reporter:datatype="id" />
6787                         <field name="ind1" />
6788                         <field name="ind2" />
6789                         <field name="record" />
6790                         <field name="subfield" />
6791                         <field name="tag" />
6792                         <field name="value" />
6793                 </fields>
6794                 <links>
6795                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6796                 </links>
6797         </class>
6798         <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">
6799                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6800                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6801                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6802                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6803                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6804                 </fields>
6805                 <links>
6806                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6807                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6808                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6809                 </links>
6810         </class>
6811         <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">
6812                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6813                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6814                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6815                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6816                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6817                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6818                 </fields>
6819                 <links>
6820                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6821                 </links>
6822         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6823             <actions>
6824                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6825                 <retrieve/>
6826                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6827                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6828             </actions>
6829         </permacrud>
6830
6831         </class>
6832         <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">
6833                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6834                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6835                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6836                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6837                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6838                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6839                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6840                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6841                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6842                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6843                 </fields>
6844                 <links>
6845                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6846                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6847                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6848                 </links>
6849         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6850             <actions>
6851                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6852                 <retrieve/>
6853                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6854                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6855             </actions>
6856         </permacrud>
6857         </class>
6858         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6859                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6860                         <field name="create_date" reporter:datatype="timestamp"/>
6861                         <field name="creator" reporter:datatype="link"/>
6862                         <field name="edit_date" reporter:datatype="timestamp"/>
6863                         <field name="editor" reporter:datatype="link"/>
6864                         <field name="id" reporter:datatype="id" />
6865                         <field name="pub" reporter:datatype="bool"/>
6866                         <field name="record" reporter:datatype="link"/>
6867                         <field name="value"  reporter:datatype="text"/>
6868                 </fields>
6869                 <links>
6870                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6871                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6872                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6873                 </links>
6874         </class>
6875         <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">
6876                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6877                         <field name="balance_owed" reporter:datatype="money" />
6878                         <field name="total_owed" reporter:datatype="money" />
6879                         <field name="total_paid" reporter:datatype="money" />
6880                         <field name="usr" reporter:datatype="link"/>
6881                 </fields>
6882                 <links>
6883                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6884                 </links>
6885         </class>
6886     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6887                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6888                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6889                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6890                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6891                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6892                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6893                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6894                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6895                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6896                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6897                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6898                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6899                 </fields>
6900                 <links>
6901                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6902                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6903                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6904                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6905                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6906                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6907                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6908                 </links>
6909         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6910             <actions>
6911                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
6912             </actions>
6913         </permacrud>
6914         </class>
6915         <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">
6916                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6917                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6918                         <field name="quality" reporter:datatype="int" />
6919                         <field name="source" reporter:datatype="text"/>
6920                         <field name="transcendant" reporter:datatype="bool"/>
6921                         <field name="can_have_copies" reporter:datatype="bool"/>
6922                 </fields>
6923                 <links/>
6924         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6925             <actions>
6926                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6927                 <retrieve/>
6928                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6929                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6930             </actions>
6931         </permacrud>
6932         </class>
6933         <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">
6934                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6935                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6936                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6937                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6938                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6939                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6940                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6941                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6942                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6943                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6944                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6945                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6946                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6947                 </fields>
6948                 <links>
6949                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6950                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6951                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6952                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6953                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6954                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6955                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6956                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6957                 </links>
6958                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6959                         <actions>
6960                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6961                                         <context link="usr" field="home_ou" />
6962                                 </retrieve>
6963                         </actions>
6964                 </permacrud>
6965         </class>
6966         <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">
6967                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6968                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6969                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6970                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6971                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6972                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6973                 </fields>
6974                 <links>
6975                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6976                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6977                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6978                 </links>
6979         </class>
6980         <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">
6981                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6982                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6983                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6984                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6985                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6986                 </fields>
6987                 <links>
6988                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6989                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6990                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6991                 </links>
6992         </class>
6993         <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">
6994                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6995                         <field name="bucket" reporter:datatype="link"/>
6996                         <field name="id" reporter:datatype="id" />
6997                         <field name="target_user" reporter:datatype="link"/>
6998                         <field name="create_time" reporter:datatype="timestamp" />
6999                         <field name="pos" reporter:datatype="int" />
7000                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7001                 </fields>
7002                 <links>
7003                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7004                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7005             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7006                 </links>
7007                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7008                         <actions>
7009                                 <retrieve permission="ADMIN_USER_BUCKET">
7010                     <context link="bucket" owning_lib="owning_lib"/>
7011                 </retrieve>
7012             </actions>
7013         </permacrud>
7014         </class>
7015         <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">
7016                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7017                         <field name="id" reporter:datatype="id" />
7018                         <field name="item" reporter:datatype="link"/>
7019                         <field name="note" reporter:datatype="text" />
7020                 </fields>
7021                 <links>
7022                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7023                 </links>
7024         </class>
7025         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7026                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7027                         <field name="balance_owed" reporter:datatype="money" />
7028                         <field name="total_owed" reporter:datatype="money" />
7029                         <field name="total_paid" reporter:datatype="money" />
7030                         <field name="usr" reporter:datatype="link"/>
7031                 </fields>
7032                 <links>
7033                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7034                 </links>
7035         </class>
7036         <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">
7037                 <fields oils_persist:primary="code" oils_persist:sequence="">
7038                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7039                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7040                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7041                 </fields>
7042                 <links/>
7043         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7044             <actions>
7045                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7046                 <retrieve/>
7047                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7048                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7049             </actions>
7050         </permacrud>
7051         </class>
7052         <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">
7053                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7054                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7055                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7056                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7057                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7058                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7059                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7060                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7061                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7062                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7063                 </fields>
7064                 <links>
7065                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7066                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7067                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7068                 </links>
7069         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7070             <actions>
7071                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7072                     <context link="xact" jump="usr" field="home_ou"/>
7073                 </retrieve>
7074                         </actions>
7075                 </permacrud>
7076         </class>
7077         <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">
7078                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7079                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7080                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7081                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7082                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7083                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7084                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7085                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7086                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7087                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7088                 </fields>
7089                 <links>
7090                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7091                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7092                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7093                 </links>
7094         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7095             <actions>
7096                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7097                     <context link="xact" jump="usr" field="home_ou"/>
7098                 </retrieve>
7099                         </actions>
7100                 </permacrud>
7101         </class>
7102         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7103                 <fields oils_persist:primary="id" oils_persist:sequence="">
7104                         <field name="checkin_lib" reporter:datatype="link"/>
7105                         <field name="checkin_staff" reporter:datatype="link"/>
7106                         <field name="checkin_time" reporter:datatype="timestamp"/>
7107                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7108                         <field name="circ_staff" reporter:datatype="link"/>
7109                         <field name="desk_renewal" reporter:datatype="bool"/>
7110                         <field name="due_date" reporter:datatype="timestamp"/>
7111                         <field name="duration" reporter:datatype="interval"/>
7112                         <field name="duration_rule" reporter:datatype="link"/>
7113                         <field name="fine_interval" reporter:datatype="interval"/>
7114                         <field name="id" reporter:datatype="id" />
7115                         <field name="max_fine" reporter:datatype="money" />
7116                         <field name="max_fine_rule" reporter:datatype="link"/>
7117                         <field name="opac_renewal" reporter:datatype="bool"/>
7118                         <field name="phone_renewal" reporter:datatype="bool"/>
7119                         <field name="recurring_fine" reporter:datatype="money" />
7120                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7121                         <field name="renewal_remaining" reporter:datatype="int" />
7122             <field name="grace_period" reporter:datatype="interval" />
7123                         <field name="stop_fines" reporter:datatype="text"/>
7124                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7125                         <field name="target_copy" reporter:datatype="link"/>
7126                         <field name="usr" reporter:datatype="link"/>
7127                         <field name="xact_finish" reporter:datatype="timestamp" />
7128                         <field name="xact_start" reporter:datatype="timestamp" />
7129                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7130                 </fields>
7131                 <links>
7132                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7133                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7134                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7135                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7136                 </links>
7137         </class>
7138         <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">
7139                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7140                         <field name="field" reporter:datatype="link"/>
7141                         <field name="id" reporter:datatype="id" />
7142                         <field name="source" reporter:datatype="link"/>
7143                         <field name="value" reporter:datatype="text"/>
7144                 </fields>
7145                 <links>
7146                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7147                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7148                 </links>
7149         </class>
7150         <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">
7151                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7152                         <field name="high" reporter:datatype="money" />
7153                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7154                         <field name="low" reporter:datatype="money" />
7155                         <field name="name" reporter:datatype="text"/>
7156                         <field name="normal" reporter:datatype="money" />
7157                         <field name="recurrence_interval" reporter:datatype="interval"/>
7158             <field name="grace_period" reporter:datatype="interval" />
7159                 </fields>
7160                 <links/>
7161         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7162             <actions>
7163                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7164                 <retrieve/>
7165                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7166                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7167             </actions>
7168         </permacrud>
7169         </class>
7170         <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">
7171                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7172                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7173                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7174                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7175                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7176                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7177                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7178                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7179                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7180                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7181                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7182                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7183                 </fields>
7184                 <links>
7185                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7186                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7187                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7188                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7189                 </links>
7190         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7191             <actions>
7192                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7193                     <context link="xact" jump="usr" field="home_ou"/>
7194                 </retrieve>
7195                         </actions>
7196                 </permacrud>
7197         </class>
7198         <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">
7199                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7200                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7201                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7202                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7203                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7204                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
7205                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7206                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7207                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7208                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7209                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7210                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7211                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7212                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7213                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7214                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7215                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7216                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7217                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7218                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7219                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7220                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7221                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7222                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
7223                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7224                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7225                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7226                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7227                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7228                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7229                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7230                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7231                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7232                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7233                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7234                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7235                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7236                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7237                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7238                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7239                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7240                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7241                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7242                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7243                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7244                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7245                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7246                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7247                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7248                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
7249                 </fields>
7250                 <links>
7251                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7252                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7253                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7254                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7255                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7256                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7257                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7258                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7259                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7260                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7261                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7262                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7263                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7264                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7265                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7266                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7267                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7268                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7269                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7270                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7271                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7272                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7273                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7274                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7275                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
7276                 </links>
7277         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7278             <actions>
7279                 <create permission="CREATE_COPY">
7280                     <context link="call_number" field="owning_lib"/>
7281                 </create>
7282                 <retrieve/>
7283                 <update permission="UPDATE_COPY">
7284                     <context link="call_number" field="owning_lib"/>
7285                 </update>
7286                 <delete permission="DELETE_COPY">
7287                     <context link="call_number" field="owning_lib"/>
7288                 </delete>
7289             </actions>
7290         </permacrud>
7291         </class>
7292
7293         <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">
7294                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
7295                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
7296                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
7297                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7298                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7299                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7300                         <field reporter:label="Event" name="event" reporter:datatype="text" />
7301                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
7302                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
7303                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
7304                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
7305                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
7306                 </fields>
7307                 <links>
7308                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
7309                 </links>
7310         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7311             <actions>
7312                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7313                 <retrieve/>
7314                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7315                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
7316             </actions>
7317         </permacrud>
7318         </class>
7319
7320         <class id="acas" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::copy_alert_suppress" oils_persist:tablename="actor.copy_alert_suppress" reporter:label="Copy Alert Suppression">
7321                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
7322                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7323                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
7324                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7325                 </fields>
7326                 <links>
7327                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7328                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7329                 </links>
7330         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7331             <actions>
7332                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7333                 <retrieve/>
7334                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7335                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
7336             </actions>
7337         </permacrud>
7338         </class>
7339
7340         <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">
7341                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
7342                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7343                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7344                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7345                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7346                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7347                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7348                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7349                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7350                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7351                 </fields>
7352                 <links>
7353                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7354                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7355                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7356                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7357                 </links>
7358         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7359             <actions>
7360                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT" global_required="true"/>
7361                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT" global_required="true"/>
7362                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT" global_required="true"/>
7363                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT" global_required="true"/>
7364             </actions>
7365         </permacrud>
7366         </class>
7367
7368         <class id="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">
7369                 <fields oils_persist:primary="id">
7370                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7371                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7372                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7373                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7374                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7375                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7376                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7377                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7378                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7379                 </fields>
7380                 <links>
7381                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7382                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7383                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7384                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7385                 </links>
7386         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7387             <actions>
7388                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT" global_required="true"/>
7389                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT" global_required="true"/>
7390                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT" global_required="true"/>
7391                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT" global_required="true"/>
7392             </actions>
7393         </permacrud>
7394         </class>
7395
7396         <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">
7397                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
7398                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
7399                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
7400                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7401                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7402                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7403                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7404                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7405                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
7406                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
7407                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7408                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7409                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7410                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
7411                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
7412                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
7413                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
7414                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
7415                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
7416                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
7417                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
7418                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
7419                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7420                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7421                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7422                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7423                 </fields>
7424                 <links>
7425                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7426                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7427                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7428                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7429                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7430                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7431                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7432                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7433                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7434                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7435                 </links>
7436                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7437                         <actions>
7438                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7439                                 <retrieve />
7440                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7441                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7442                         </actions>
7443                 </permacrud>
7444         </class>
7445
7446         <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">
7447                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7448                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7449                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7450                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7451                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7452                 </fields>
7453                 <links/>
7454         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7455             <actions>
7456                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7457                 <retrieve/>
7458                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7459                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7460             </actions>
7461         </permacrud>
7462         </class>
7463         <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">
7464                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7465                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7466                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7467                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7468                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7469                 </fields>
7470                 <links/>
7471         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7472             <actions>
7473                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7474                 <retrieve/>
7475                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7476                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7477             </actions>
7478         </permacrud>
7479         </class>
7480         <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">
7481                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7482                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7483                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7484                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7485                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7486                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7487                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7488                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7489                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7490                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7491                 </fields>
7492                 <links>
7493                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7494                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7495                 </links>
7496         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7497             <actions>
7498                 <create permission="CREATE_PERM" global_required="true"/>
7499                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7500                 <update permission="UPDATE_PERM" global_required="true"/>
7501                 <delete permission="DELETE_PERM" global_required="true"/>
7502             </actions>
7503         </permacrud>
7504         </class>
7505         <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">
7506                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7507                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7508                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7509                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7510                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7511                 </fields>
7512                 <links>
7513                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7514                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7515                 </links>
7516         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7517             <actions>
7518                 <create permission="ADMIN_SURVEY">
7519                     <context link="question" jump="survey" field="owner"/>
7520                 </create>
7521                 <retrieve/>
7522                 <update permission="ADMIN_SURVEY">
7523                     <context link="question" jump="survey" field="owner"/>
7524                 </update>
7525                 <delete permission="ADMIN_SURVEY">
7526                     <context link="question" jump="survey" field="owner"/>
7527                 </delete>
7528             </actions>
7529         </permacrud>
7530         </class>
7531         <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">
7532                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7533                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7534                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7535                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7536                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7537                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7538                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7539                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7540                 </fields>
7541                 <links>
7542                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7543                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7544                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7545                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7546                 </links>
7547                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7548                         <actions>
7549                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7550                         </actions>
7551                 </permacrud>
7552         </class>
7553         <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">
7554                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7555                         <field name="balance_owed" reporter:datatype="money" />
7556                         <field name="total_owed" reporter:datatype="money" />
7557                         <field name="total_paid" reporter:datatype="money" />
7558                         <field name="usr" reporter:datatype="link"/>
7559                 </fields>
7560                 <links>
7561                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7562                 </links>
7563         </class>
7564         <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">
7565                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7566                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7567                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7568                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7569                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7570                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7571                 </fields>
7572                 <links>
7573                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7574                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7575                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7576                 </links>
7577         </class>
7578         <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">
7579                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7580                         <field name="field" reporter:datatype="link"/>
7581                         <field name="id" reporter:datatype="id" />
7582                         <field name="source" reporter:datatype="link"/>
7583                         <field name="value" reporter:datatype="text"/>
7584                 </fields>
7585                 <links>
7586                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7587                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7588                 </links>
7589         </class>
7590         <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">
7591                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7592                         <field name="field" reporter:datatype="link"/>
7593                         <field name="id" reporter:datatype="id" />
7594                         <field name="source" reporter:datatype="link"/>
7595                         <field name="value" reporter:datatype="text"/>
7596                 </fields>
7597                 <links>
7598                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7599                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7600                 </links>
7601         </class>
7602         <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">
7603                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7604                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7605                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7606                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7607                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7608                 </fields>
7609                 <links>
7610                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7611                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7612                 </links>
7613         </class>
7614         <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">
7615                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7616                         <field name="depth" reporter:datatype="int" />
7617                         <field name="grantable" reporter:datatype="bool"/>
7618                         <field name="grp" reporter:datatype="link"/>
7619                         <field name="id" reporter:datatype="id" />
7620                         <field name="perm" reporter:datatype="link"/>
7621                 </fields>
7622                 <links>
7623                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7624                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7625                 </links>
7626         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7627             <actions>
7628                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7629                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7630                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7631                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7632             </actions>
7633         </permacrud>
7634         </class>
7635         <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">
7636                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7637                         <field name="items" oils_persist:virtual="true" />
7638                         <field name="btype" reporter:datatype="text"/>
7639                         <field name="id" reporter:datatype="id" />
7640                         <field name="name" reporter:datatype="text"/>
7641                         <field name="description" reporter:datatype="text"/>
7642                         <field name="owner" reporter:datatype="link"/>
7643                         <field name="pub" reporter:datatype="bool"/>
7644                         <field name="create_time" reporter:datatype="timestamp" />
7645                         <field name="owning_lib" reporter:datatype="org_unit" />
7646                 </fields>
7647                 <links>
7648                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7649                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7650                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7651                 </links>
7652                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7653                         <actions>
7654                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7655                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7656                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7657                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7658                         </actions>
7659                 </permacrud>
7660         </class>
7661         <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">
7662                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7663                         <field name="id" reporter:datatype="id" />
7664                         <field name="bucket" reporter:datatype="link"/>
7665                         <field name="note" reporter:datatype="text" />
7666                 </fields>
7667                 <links>
7668                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7669                 </links>
7670         </class>
7671         <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">
7672                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7673                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
7674                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7675                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
7676                 </fields>
7677                 <links>
7678                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7679                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7680                 </links>
7681         </class>
7682         <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">
7683                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7684                         <field name="depth" reporter:datatype="int"/>
7685                         <field name="grantable" reporter:datatype="bool"/>
7686                         <field name="id" reporter:datatype="id" />
7687                         <field name="perm" reporter:datatype="link"/>
7688                         <field name="usr" reporter:datatype="link"/>
7689                 </fields>
7690                 <links>
7691                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7692                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7693                 </links>
7694         </class>
7695         <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">
7696                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7697                         <field name="object_id" reporter:datatype="text"/>
7698                         <field name="grantable" reporter:datatype="bool"/>
7699                         <field name="id" reporter:datatype="id" />
7700                         <field name="perm" reporter:datatype="link"/>
7701                         <field name="usr" reporter:datatype="link"/>
7702                         <field name="object_type" reporter:datatype="text"/>
7703                 </fields>
7704                 <links>
7705                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7706                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7707                 </links>
7708         </class>
7709         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
7710                 <fields oils_persist:primary="id" oils_persist:sequence="">
7711                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7712                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7713                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7714                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7715                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7716                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7717                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7718                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7719                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7720                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7721                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7722                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7723                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7724                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7725                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7726                 </fields>
7727                 <links>
7728                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7729                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7730                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7731                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7732                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7733                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7734                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7735                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7736                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7737                 </links>
7738         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7739             <actions>
7740                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7741                     <context link="xact" jump="usr" field="home_ou"/>
7742                 </retrieve>
7743                         </actions>
7744                 </permacrud>
7745         </class>
7746         <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">
7747                 <fields oils_persist:primary="id" oils_persist:sequence="">
7748                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7749                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7750                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7751                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7752                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7753                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7754                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7755                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7756                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7757                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7758                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7759                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7760                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7761                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7762                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7763                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7764                 </fields>
7765                 <links>
7766                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7767                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7768                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7769                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7770                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7771                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7772                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7773                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7774                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7775                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7776                 </links>
7777                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7778                         <actions>
7779                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7780                                         <context link="xact" jump="usr" field="home_ou"/>
7781                                 </retrieve>
7782                         </actions>
7783                 </permacrud>
7784         </class>
7785         <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">
7786                 <fields oils_persist:primary="id" oils_persist:sequence="">
7787                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7788                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7789                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7790                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7791                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7792                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7793                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7794                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7795                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7796                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7797                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7798                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7799                 </fields>
7800                 <links>
7801                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7802                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7803                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7804                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7805                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7806                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7807                 </links>
7808         </class>
7809         <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">
7810                 <fields oils_persist:primary="id" oils_persist:sequence="">
7811                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7812                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7813                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7814                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7815                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7816                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7817                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7818                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7819                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7820                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7821                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7822                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7823                 </fields>
7824                 <links>
7825                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7826                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7827                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7828                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7829                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7830                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7831                 </links>
7832         </class>
7833         <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">
7834                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7835                         <field name="bucket" reporter:datatype="link"/>
7836                         <field name="id" reporter:datatype="id" />
7837                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7838                         <field name="create_time" reporter:datatype="timestamp" />
7839                         <field name="pos" reporter:datatype="int" />
7840                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7841                 </fields>
7842                 <links>
7843                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7844                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7845             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7846                 </links>
7847                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7848                         <actions>
7849                                 <retrieve permission="ADMIN_COPY_BUCKET">
7850                     <context link="bucket" owning_lib="owning_lib"/>
7851                 </retrieve>
7852             </actions>
7853         </permacrud>
7854         </class>
7855         <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">
7856                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7857                         <field name="id" reporter:datatype="id" />
7858                         <field name="item" reporter:datatype="link"/>
7859                         <field name="note" reporter:datatype="text" />
7860                 </fields>
7861                 <links>
7862                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7863                 </links>
7864         </class>
7865         <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">
7866                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7867                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7868                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7869                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7870                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7871                 </fields>
7872                 <links>
7873                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7874                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7875                 </links>
7876                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7877                         <actions>
7878                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7879                         </actions>
7880                 </permacrud>
7881         </class>
7882     <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">
7883         <fields oils_persist:primary="field">
7884             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7885             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7886             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7887         </fields>
7888         <links/>
7889         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7890             <actions>
7891                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7892                 <retrieve />
7893                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7894                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7895             </actions>
7896         </permacrud>
7897     </class>
7898         <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">
7899                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7900                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7901                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7902                 </fields>
7903                 <links/>
7904         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7905             <actions>
7906                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7907                 <retrieve/>
7908                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7909                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7910             </actions>
7911         </permacrud>
7912         </class>
7913
7914
7915         <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">
7916                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7917                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7918                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7919                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7920                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7921                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7922                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7923                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7924                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7925                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7926                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7927                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7928                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7929                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7930                 </fields>
7931                 <links>
7932                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7933                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7934                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7935                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7936                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7937                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7938                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7939                 </links>
7940         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7941             <actions>
7942                 <create permission="TRANSIT_COPY">
7943                     <context link="target_copy" field="owner"/>
7944                 </create>
7945                 <retrieve/>
7946                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7947                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7948             </actions>
7949         </permacrud>
7950         </class>
7951         <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">
7952                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7953                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7954                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7955                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7956                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7957                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7958                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7959                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7960                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7961                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7962                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7963                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7964                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7965                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7966                 </fields>
7967                 <links>
7968                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7969                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7970                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7971                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7972                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7973                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7974                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7975                 </links>
7976         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7977             <actions>
7978                 <create permission="TRANSIT_COPY" context_field="owner">
7979                     <context link="target_copy" field="circ_lib"/>
7980                 </create>
7981                 <retrieve/>
7982                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7983                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7984             </actions>
7985         </permacrud>
7986         </class>
7987         <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">
7988                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7989                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7990                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7991                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7992                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7993                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7994                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7995                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7996                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7997                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7998                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7999                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8000                 </fields>
8001                 <links>
8002                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8003                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8004                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8005                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8006                 </links>
8007         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8008             <actions>
8009                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8010                     <context link="xact" jump="usr" field="home_ou"/>
8011                 </retrieve>
8012                         </actions>
8013                 </permacrud>
8014         </class>
8015         <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">
8016                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8017                         <field name="grp" />
8018                         <field name="id" reporter:datatype="id" />
8019                         <field name="usr" />
8020                 </fields>
8021                 <links>
8022                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8023                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8024                 </links>
8025         </class>
8026         <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">
8027                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8028                         <field name="id" reporter:datatype="id" />
8029                         <field name="fq_field" reporter:datatype="text"/>
8030                         <field name="identity_value" reporter:datatype="text"/>
8031                         <field name="translation" reporter:datatype="text"/>
8032                         <field name="string" reporter:datatype="text"/>
8033                 </fields>
8034                 <links>
8035                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
8036                 </links>
8037         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8038             <actions>
8039                 <create permission="CREATE_TRANSLATION" global_required="true"/>
8040                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
8041                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
8042                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
8043             </actions>
8044         </permacrud>
8045         </class>
8046         <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">
8047                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
8048                         <field name="id" reporter:datatype="id" />
8049                         <field name="fm_class" reporter:datatype="text"/>
8050                         <field name="field" reporter:datatype="text"/>
8051                         <field name="owner" reporter:datatype="org_unit"/>
8052                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
8053                 </fields>
8054                 <links>
8055                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8056                 </links>
8057         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8058             <actions>
8059                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8060                 <retrieve/>
8061                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8062                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8063             </actions>
8064         </permacrud>
8065         </class>
8066         <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">
8067                 <fields oils_persist:primary="code">
8068                         <field name="code" reporter:datatype="id" />
8069                         <field name="marc_code" reporter:datatype="text"/>
8070                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8071                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8072                         <field name="rtl" reporter:datatype="bool"/>
8073                 </fields>
8074                 <links/>
8075         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8076             <actions>
8077                 <create permission="CREATE_LOCALE" global_required="true"/>
8078                 <retrieve/>
8079                 <update permission="UPDATE_LOCALE" global_required="true"/>
8080                 <delete permission="DELETE_LOCALE" global_required="true"/>
8081             </actions>
8082         </permacrud>
8083         </class>
8084         <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">
8085                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
8086                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
8087                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
8088                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
8089             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
8090                 </fields>
8091                 <links>
8092                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8093                 </links>
8094         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8095             <actions>
8096                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
8097                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
8098                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
8099                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
8100             </actions>
8101         </permacrud>
8102         </class>
8103
8104         <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">
8105                 <fields oils_persist:primary="id">
8106                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8107                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8108                 </fields>
8109                 <links/>
8110         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8111             <actions>
8112                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8113                 <retrieve/>
8114                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8115                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8116             </actions>
8117         </permacrud>
8118         </class>
8119
8120         <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">
8121                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
8122                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8123                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8124                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8125                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8126                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8127                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8128                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8129                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8130                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8131                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8132                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8133                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8134                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8135                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8136                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8137                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8138                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8139                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8140                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8141                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8142                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8143                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8144                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8145                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8146                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8147                 </fields>
8148                 <links>
8149                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8150                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8151                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8152                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8153                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8154                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8155                 </links>
8156         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8157             <actions>
8158                 <create permission="user_request.create">
8159                     <context link="usr" field="home_ou"/>
8160                                 </create>
8161                 <retrieve permission="user_request.view">
8162                     <context link="usr" field="home_ou"/>
8163                                 </retrieve>
8164                 <update permission="user_request.update">
8165                     <context link="usr" field="home_ou"/>
8166                                 </update>
8167                 <delete permission="user_request.delete">
8168                     <context link="usr" field="home_ou"/>
8169                                 </delete>
8170             </actions>
8171         </permacrud>
8172         </class>
8173
8174         <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">
8175                 <fields oils_persist:primary="code">
8176                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
8177                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8178                 </fields>
8179                 <links/>
8180         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8181             <actions>
8182                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8183                 <retrieve/>
8184                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8185                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8186             </actions>
8187         </permacrud>
8188         </class>
8189
8190         <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">
8191                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
8192                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
8193                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
8194                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
8195                         <field reporter:label="Ratio" name="ratio" />
8196                 </fields>
8197                 <links>
8198                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
8199                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
8200                 </links>
8201                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8202                         <actions>
8203                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8204                                 <retrieve/>
8205                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8206                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8207                         </actions>
8208                 </permacrud>
8209         </class>
8210
8211         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
8212                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
8213                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8214                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8215                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8216                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8217                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8218                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
8219                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
8220                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
8221                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
8222                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8223                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8224                         <field reporter:label="URL" name="url" reporter:datatype="text" />
8225                         <field reporter:label="Email" name="email" reporter:datatype="text" />
8226                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
8227                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
8228                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
8229                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
8230                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
8231                 </fields>
8232                 <links>
8233                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8234                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8235             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
8236             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
8237                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
8238                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
8239                 </links>
8240         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8241             <actions>
8242                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
8243                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
8244                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
8245                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
8246             </actions>
8247         </permacrud>
8248         </class>
8249
8250         <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">
8251                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
8252                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8253                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8254                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8255                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8256                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8257                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8258                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8259                 </fields>
8260                 <links>
8261                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8262                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8263                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8264                 </links>
8265         </class>
8266
8267         <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">
8268                 <fields oils_persist:primary="code">
8269                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
8270                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8271                 </fields>
8272                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8273             <actions>
8274                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8275                 <retrieve/>
8276                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8277                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8278             </actions>
8279                 </permacrud>
8280         </class>
8281
8282         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
8283                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
8284                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
8285                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
8286                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8287                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
8288                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
8289                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
8290                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
8291                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
8292                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
8293                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
8294                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8295                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
8296                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
8297                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
8298                 </fields>
8299                 <links>
8300                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
8301                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8302                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
8303                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
8304                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
8305                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
8306                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
8307                 </links>
8308         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8309             <actions>
8310                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
8311                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
8312                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
8313                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
8314             </actions>
8315         </permacrud>
8316         </class>
8317
8318         <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">
8319                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
8320                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8321                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8322                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8323                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
8324                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
8325                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
8326                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8327                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
8328                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8329                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8330                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8331                 </fields>
8332                 <links>
8333                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8334                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8335                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8336                 </links>
8337         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8338             <actions>
8339                 <create   permission="ADMIN_INVOICE">
8340                                         <context link="invoice" field="receiver"/>
8341                                 </create>
8342                 <retrieve permission="ADMIN_INVOICE">
8343                                         <context link="invoice" field="receiver"/>
8344                                 </retrieve>
8345                 <update   permission="ADMIN_INVOICE">
8346                                         <context link="invoice" field="receiver"/>
8347                                 </update>
8348                                 <delete   permission="ADMIN_INVOICE">
8349                                         <context link="invoice" field="receiver"/>
8350                                 </delete>
8351             </actions>
8352         </permacrud>
8353         </class>
8354
8355         <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">
8356                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
8357                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8358                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8359                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8360                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8361                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
8362                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
8363                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8364                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8365                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8366                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8367                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8368                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8369                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
8370                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8371                 </fields>
8372                 <links>
8373                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8374                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8375                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8376                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8377                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8378                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
8379                 </links>
8380         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8381             <actions>
8382                 <create   permission="ADMIN_INVOICE">
8383                                         <context link="invoice" field="receiver"/>
8384                                 </create>
8385                 <retrieve permission="ADMIN_INVOICE">
8386                                         <context link="invoice" field="receiver"/>
8387                                 </retrieve>
8388                 <update   permission="ADMIN_INVOICE">
8389                                         <context link="invoice" field="receiver"/>
8390                                 </update>
8391                                 <delete   permission="ADMIN_INVOICE">
8392                                         <context link="invoice" field="receiver"/>
8393                                 </delete>
8394             </actions>
8395         </permacrud>
8396         </class>
8397
8398         <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">
8399                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
8400                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
8401                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8402                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8403                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8404                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8405                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8406                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
8407                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8408                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
8409                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
8410                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
8411                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8412                 </fields>
8413                 <links>
8414                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8415                 </links>
8416         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8417             <actions>
8418                 <create permission="ADMIN_PROVIDER">
8419                     <context link="provider" field="owner"/>
8420                 </create>
8421                 <retrieve permission="ADMIN_PROVIDER">
8422                     <context link="provider" field="owner"/>
8423                 </retrieve>
8424                 <update permission="ADMIN_PROVIDER">
8425                     <context link="provider" field="owner"/>
8426                 </update>
8427                 <delete permission="ADMIN_PROVIDER">
8428                     <context link="provider" field="owner"/>
8429                 </delete>
8430             </actions>
8431         </permacrud>
8432         </class>
8433
8434         <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">
8435                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
8436                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8437                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8438                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8439                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
8440                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
8441                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
8442         </fields>
8443                 <links>
8444                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8445                 </links>
8446         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8447             <actions>
8448                 <create permission="ADMIN_PROVIDER">
8449                     <context link="provider" field="owner"/>
8450                 </create>
8451                 <retrieve permission="ADMIN_PROVIDER">
8452                     <context link="provider" field="owner"/>
8453                 </retrieve>
8454                 <update permission="ADMIN_PROVIDER">
8455                     <context link="provider" field="owner"/>
8456                 </update>
8457                 <delete permission="ADMIN_PROVIDER">
8458                     <context link="provider" field="owner"/>
8459                 </delete>
8460             </actions>
8461         </permacrud>
8462     </class>
8463         <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">
8464                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
8465                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
8466                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8467                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8468                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8469                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
8470                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8471                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8472                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
8473                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
8474                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
8475                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
8476                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8477                 </fields>
8478                 <links>
8479                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
8480                 </links>
8481         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8482             <actions>
8483                 <create permission="ADMIN_PROVIDER">
8484                     <context link="contact" jump='provider' field="owner"/>
8485                 </create>
8486                 <retrieve permission="ADMIN_PROVIDER">
8487                     <context link="contact" jump='provider' field="owner"/>
8488                 </retrieve>
8489                 <update permission="ADMIN_PROVIDER">
8490                     <context link="contact" jump='provider' field="owner"/>
8491                 </update>
8492                 <delete permission="ADMIN_PROVIDER">
8493                     <context link="contact" jump='provider' field="owner"/>
8494                 </delete>
8495             </actions>
8496         </permacrud>
8497         </class>
8498
8499         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
8500                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
8501                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
8502                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
8503                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
8504                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
8505                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
8506                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
8507                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
8508                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8509                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
8510                 </fields>
8511                 <links>
8512                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
8513                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
8514                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
8515                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8516                 </links>
8517         </class>
8518
8519         <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">
8520                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
8521                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8522                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
8523                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
8524                 </fields>
8525                 <links>
8526             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
8527                 </links>
8528                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8529                         <actions>
8530                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8531                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8532                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8533                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8534                         </actions>
8535                 </permacrud>
8536         </class>
8537
8538         <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">
8539                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
8540                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
8541                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
8542                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
8543                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
8544                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
8545                 </fields>
8546                 <links>
8547                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
8548                 </links>
8549                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8550                         <actions>
8551                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8552                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8553                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8554                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8555                         </actions>
8556                 </permacrud>
8557         </class>
8558
8559         <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">
8560                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
8561                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8562                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8563                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8564                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8565                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8566                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8567                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8568                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
8569                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
8570                 </fields>
8571                 <links>
8572                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8573                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8574             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
8575             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
8576                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
8577                 </links>
8578         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8579             <actions>
8580                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8581                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
8582                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8583                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8584             </actions>
8585         </permacrud>
8586         </class>
8587
8588         <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">
8589                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8590                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8591                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8592                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8593                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8594                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8595                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8596                 </fields>
8597                 <links>
8598                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8599                 </links>
8600                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8601                         <actions>
8602                                 <create permission="ADMIN_FUNDING_SOURCE">
8603                     <context link="funding_source" field="owner"/>
8604                 </create>
8605                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8606                     <context link="funding_source" field="owner"/>
8607                 </retrieve>
8608                                 <update permission="ADMIN_FUNDING_SOURCE">
8609                     <context link="funding_source" field="owner"/>
8610                 </update>
8611                                 <delete permission="ADMIN_FUNDING_SOURCE">
8612                     <context link="funding_source" field="owner"/>
8613                 </delete>
8614                         </actions>
8615                 </permacrud>
8616         </class>
8617
8618         <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">
8619                 <fields oils_persist:primary="id">
8620                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8621                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8622                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8623                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8624                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8625                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8626                 </fields>
8627                 <links>
8628                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8629                 </links>
8630         </class>
8631
8632         <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">
8633                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8634                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8635                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8636                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8637                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8638                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8639                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
8640                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
8641                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8642                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
8643                 </fields>
8644                 <links>
8645                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8646                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8647                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
8648                 </links>
8649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8650                         <actions>
8651                                 <create permission="ADMIN_ACQ_FUND">
8652                     <context link="fund" field="org"/>
8653                 </create>
8654                                 <retrieve permission="ADMIN_ACQ_FUND">
8655                     <context link="fund" field="org"/>
8656                 </retrieve>
8657                                 <update permission="ADMIN_ACQ_FUND">
8658                     <context link="fund" field="org"/>
8659                 </update>
8660                                 <delete permission="ADMIN_ACQ_FUND">
8661                     <context link="fund" field="org"/>
8662                 </delete>
8663                         </actions>
8664                 </permacrud>
8665         </class>
8666
8667         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
8668                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8669                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8670                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8671                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8672                         <field reporter:label="Year" name="year" reporter:datatype="int" />
8673                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8674                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8675                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8676                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8677                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8678                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8679                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8680                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8681                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8682                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8683                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8684                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8685                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8686                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8687                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8688                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8689                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8690                 </fields>
8691                 <links>
8692                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8693                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8694             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8695             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8696             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8697             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8698             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8699             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8700             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8701             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8702             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8703                 </links>
8704         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8705             <actions>
8706                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8707                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8708                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8709                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8710             </actions>
8711         </permacrud>
8712         </class>
8713
8714         <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">
8715                 <fields oils_persist:primary="fund">
8716                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8717                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8718                 </fields>
8719                 <links>
8720                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8721                 </links>
8722         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8723             <actions>
8724                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8725                                         <context link="fund" field="org" />
8726                 </retrieve>
8727             </actions>
8728         </permacrud>
8729         </class>
8730
8731         <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">
8732                 <fields oils_persist:primary="fund">
8733                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8734                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8735                 </fields>
8736                 <links>
8737                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8738                 </links>
8739         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8740             <actions>
8741                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8742                                         <context link="fund" field="org" />
8743                 </retrieve>
8744             </actions>
8745         </permacrud>
8746         </class>
8747
8748         <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">
8749                 <fields oils_persist:primary="fund">
8750                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8751                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8752                 </fields>
8753                 <links>
8754                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8755                 </links>
8756         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8757             <actions>
8758                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8759                                         <context link="fund" field="org" />
8760                 </retrieve>
8761             </actions>
8762         </permacrud>
8763         </class>
8764
8765         <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">
8766                 <fields oils_persist:primary="fund">
8767                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8768                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8769                 </fields>
8770                 <links>
8771                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8772                 </links>
8773         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8774             <actions>
8775                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8776                                         <context link="fund" field="org" />
8777                 </retrieve>
8778             </actions>
8779         </permacrud>
8780         </class>
8781
8782         <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">
8783                 <fields oils_persist:primary="fund">
8784                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8785                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8786                 </fields>
8787                 <links>
8788                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8789                 </links>
8790         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8791             <actions>
8792                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8793                                         <context link="fund" field="org" />
8794                 </retrieve>
8795             </actions>
8796         </permacrud>
8797         </class>
8798
8799    <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">
8800         <fields oils_persist:primary="fund">
8801             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8802             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8803         </fields>
8804         <links>
8805             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8806         </links>
8807     </class>
8808
8809    <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">
8810         <fields oils_persist:primary="fund">
8811             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8812             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8813         </fields>
8814         <links>
8815             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8816         </links>
8817     </class>
8818
8819    <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">
8820         <fields oils_persist:primary="fund">
8821             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8822             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8823         </fields>
8824         <links>
8825             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8826         </links>
8827     </class>
8828
8829    <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">
8830         <fields oils_persist:primary="fund">
8831             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8832             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8833         </fields>
8834         <links>
8835             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8836         </links>
8837     </class>
8838
8839    <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">
8840         <fields oils_persist:primary="fund">
8841             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8842             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8843         </fields>
8844         <links>
8845             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8846         </links>
8847     </class>
8848
8849         <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">
8850                 <fields oils_persist:primary="funding_source">
8851                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8852                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8853                 </fields>
8854                 <links>
8855                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8856                 </links>
8857         </class>
8858
8859         <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">
8860                 <fields oils_persist:primary="funding_source">
8861                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8862                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8863                 </fields>
8864                 <links>
8865                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8866                 </links>
8867         </class>
8868
8869         <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">
8870                 <fields oils_persist:primary="funding_source">
8871                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8872                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8873                 </fields>
8874                 <links>
8875                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8876                 </links>
8877         </class>
8878
8879         <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">
8880                 <fields oils_persist:primary="fund">
8881                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8882                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8883                 </fields>
8884                 <links>
8885                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8886                 </links>
8887         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8888             <actions>
8889                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8890                                         <context link="fund" field="org" />
8891                 </retrieve>
8892             </actions>
8893         </permacrud>
8894     </class>
8895     <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">
8896         <oils_persist:source_definition><![CDATA[
8897             SELECT
8898                 acqf.*,
8899                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8900                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8901                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8902                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8903             FROM
8904                 acq.fund acqf
8905                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8906                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8907                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8908                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8909         ]]></oils_persist:source_definition>
8910         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8911             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8912             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8913             <field reporter:label="Name" name="name" reporter:datatype="text" />
8914             <field reporter:label="Year" name="year" reporter:datatype="int" />
8915             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8916             <field reporter:label="Code" name="code" reporter:datatype="text" />
8917             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8918             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8919             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8920             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8921             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8922
8923             <!-- non fund-native fields -->
8924             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8925             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8926             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8927             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8928         </fields>
8929         <links>
8930             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8931             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8932             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8933         </links>
8934         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8935             <actions>
8936                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8937             </actions>
8938         </permacrud>
8939         </class>
8940         <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">
8941                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8942                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8943                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8944                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8945                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8946                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8947                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8948                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8949                 </fields>
8950                 <links>
8951                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8952                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8953                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8954                 </links>
8955                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8956                         <actions>
8957                                 <create permission="ADMIN_ACQ_FUND">
8958                     <context link="fund" field="org"/>
8959                 </create>
8960                                 <retrieve permission="ADMIN_ACQ_FUND">
8961                     <context link="fund" field="org"/>
8962                 </retrieve>
8963                                 <update permission="ADMIN_ACQ_FUND">
8964                     <context link="fund" field="org"/>
8965                 </update>
8966                                 <delete permission="ADMIN_ACQ_FUND">
8967                     <context link="fund" field="org"/>
8968                 </delete>
8969                         </actions>
8970                 </permacrud>
8971         </class>
8972
8973     <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">
8974         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8975             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8976             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8977             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8978             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8979             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8980             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8981             <field reporter:label="Note" name="note" reporter:datatype="text" />
8982             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8983         </fields>
8984         <links>
8985             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8986             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8987             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8988         </links>
8989                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8990                         <actions>
8991                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8992                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8993                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8994                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8995                         </actions>
8996                 </permacrud>
8997     </class>
8998
8999         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
9000                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
9001                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
9002                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9003                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
9004                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9005                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9006                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9007                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
9008                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
9009                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9010                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9011                 </fields>
9012                 <links>
9013                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9014                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9015                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9016                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9017                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
9018                 </links>
9019                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9020                         <actions>
9021                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
9022                         </actions>
9023                 </permacrud>
9024         </class>
9025
9026         <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">
9027                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
9028                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9029                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
9030                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9031                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
9032                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
9033                 </fields>
9034                 <links>
9035                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9036                 </links>
9037                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9038                         <actions>
9039                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9040                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
9041                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9042                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9043                         </actions>
9044                 </permacrud>
9045         </class>
9046
9047         <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">
9048                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
9049                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9050                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9051                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9052                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9053                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9054                         <field reporter:label="State" name="state" reporter:datatype="text" />
9055                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
9056                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9057                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9058                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
9059                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9060                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9061                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9062                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
9063                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
9064                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
9065                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
9066                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
9067                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
9068                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9069                 </fields>
9070                 <links>
9071                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9072                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9073                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9074                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
9075                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9076                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
9077                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
9078                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
9079                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9080                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9081                 </links>
9082                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9083                         <actions>
9084                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9085                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9086                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9087                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9088                         </actions>
9089                 </permacrud>
9090         </class>
9091
9092         <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">
9093                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
9094                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9095                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9096                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9097                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
9098                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9099                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9100                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9101                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9102                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9103                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9104                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9105                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9106                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
9107                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9108                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9109                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9110                 </fields>
9111                 <links>
9112                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
9113                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9114                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9115                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9116                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9117                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9118                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9119                 </links>
9120                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9121             <actions>
9122                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9123             </actions>
9124                 </permacrud>
9125         </class>
9126
9127         <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">
9128                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
9129                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9130                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9131                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9132                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9133                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9134                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9135                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
9136                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9137                 </fields>
9138                 <links>
9139                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9140                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9141                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9142                 </links>
9143                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9144             <actions>
9145                 <create permission="CREATE_PURCHASE_ORDER">
9146                     <context link="purchase_order" field="ordering_agency"/>
9147                 </create>
9148                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9149                     <context link="purchase_order" field="ordering_agency"/>
9150                 </retrieve>
9151                 <update permission="CREATE_PURCHASE_ORDER">
9152                     <context link="purchase_order" field="ordering_agency"/>
9153                 </update>
9154                 <delete permission="CREATE_PURCHASE_ORDER">
9155                     <context link="purchase_order" field="ordering_agency"/>
9156                 </delete>
9157             </actions>
9158                 </permacrud>
9159         </class>
9160
9161         <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">
9162                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
9163                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9164                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9165                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9166                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
9167                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
9168                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
9169                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9170                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
9171                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9172                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9173                 </fields>
9174                 <links>
9175                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9176                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9177                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9178                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9179                 </links>
9180                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9181             <actions>
9182                 <create permission="CREATE_PURCHASE_ORDER">
9183                     <context link="purchase_order" field="ordering_agency"/>
9184                 </create>
9185                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9186                     <context link="purchase_order" field="ordering_agency"/>
9187                 </retrieve>
9188                 <update permission="CREATE_PURCHASE_ORDER">
9189                     <context link="purchase_order" field="ordering_agency"/>
9190                 </update>
9191                 <delete permission="CREATE_PURCHASE_ORDER">
9192                     <context link="purchase_order" field="ordering_agency"/>
9193                 </delete>
9194             </actions>
9195                 </permacrud>
9196         </class>
9197
9198         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
9199                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
9200                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
9201                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
9202                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
9203                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9204                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9205                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9206                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9207                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
9208                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
9209                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
9210                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
9211                         <field reporter:label="State" name="state" reporter:datatype="text" />
9212                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9213                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9214                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
9215                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9216                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9217                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9218                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
9219                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9220                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9221                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
9222                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
9223                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
9224                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
9225                 </fields>
9226                 <links>
9227                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9228                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9229                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9230                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9231                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9232                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9233                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9234                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
9235                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
9236                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
9237                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9238                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
9239                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9240                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
9241                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
9242                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9243                 </links>
9244                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9245                         <actions>
9246                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
9247                                         <context link="purchase_order" field="ordering_agency"/>
9248                                         <context link="picklist" field="org_unit"/>
9249                                 </retrieve>
9250                         </actions>
9251                 </permacrud>
9252         </class>
9253
9254         <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">
9255                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
9256                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9257                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9258                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9259                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
9260                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9261                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9262                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
9263                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9264                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9265                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
9266                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
9267                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9268                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9269                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
9270                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
9271                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
9272                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9273                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
9274                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9275                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9276                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9277                 </fields>
9278                 <links>
9279                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
9280                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9281                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9282                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9283                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9284                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9285                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9286                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9287                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9288                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9289                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9290                 </links>
9291                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9292                         <actions>
9293                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9294                                         <context link="purchase_order" field="ordering_agency"/>
9295                                         <context link="picklist" field="org_unit"/>
9296                                 </retrieve>
9297                         </actions>
9298                 </permacrud>
9299         </class>
9300
9301         <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">
9302                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
9303                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
9304                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9305                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9306                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9307                 </fields>
9308                 <links>
9309                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9310                 </links>
9311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9312                         <actions>
9313                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9314                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
9315                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9316                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9317                         </actions>
9318                 </permacrud>
9319         </class>
9320
9321         <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">
9322                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
9323                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
9324                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
9325                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9326                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9327                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9328                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9329                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9330                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
9331                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9332                 </fields>
9333                 <links>
9334                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9335                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9336                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9337                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
9338                 </links>
9339         </class>
9340
9341         <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">
9342                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
9343                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
9344                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
9345                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
9346                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
9347                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
9348                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
9349                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
9350                 </fields>
9351                 <links>
9352                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9353                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
9354                 </links>
9355         </class>
9356
9357         <class id="acqlid" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_detail" oils_persist:tablename="acq.lineitem_detail" reporter:label="Line Item Detail">
9358                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
9359                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
9360                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9361                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
9362                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
9363                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
9364                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
9365                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
9366                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9367                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
9368                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9369                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
9370                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
9371                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9372                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
9373                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9374                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
9375                 </fields>
9376                 <links>
9377                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9378                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
9379                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9380                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9381                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9382                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9383                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9384                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9385                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
9386                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
9387                 </links>
9388         </class>
9389
9390         <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">
9391                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9392                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9393                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9394                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9395                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9396                 </fields>
9397                 <links/>
9398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9399                         <actions>
9400                                 <retrieve />
9401                         </actions>
9402                 </permacrud>
9403         </class>
9404
9405         <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">
9406                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9407                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9408                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9409                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9410                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9411                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9412             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9413                 </fields>
9414                 <links/>
9415         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9416             <actions>
9417                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9418                 <retrieve />
9419                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9420                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9421             </actions>
9422         </permacrud>
9423         </class>
9424
9425         <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">
9426                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9427                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9428                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9429                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9430                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9431                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9432                 </fields>
9433                 <links/>
9434         </class>
9435         <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">
9436                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9437                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9438                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9439                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9440                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9441                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9442                 </fields>
9443                 <links>
9444                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9445                 </links>
9446         </class>
9447
9448         <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">
9449             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9450                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9451                 <field reporter:label="Code" name="code" reporter:datatype="text" />
9452                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9453                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9454                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9455                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9456         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9457
9458             </fields>
9459             <links>
9460                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9461             </links>
9462             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9463                 <actions>
9464                     <create permission="ADMIN_PROVIDER">
9465                         <context link="provider" field="owner"/>
9466                     </create>
9467                     <retrieve permission="ADMIN_PROVIDER">
9468                         <context link="provider" field="owner"/>
9469                     </retrieve>
9470                     <update permission="ADMIN_PROVIDER">
9471                         <context link="provider" field="owner"/>
9472                     </update>
9473                     <delete permission="ADMIN_PROVIDER">
9474                         <context link="provider" field="owner"/>
9475                     </delete>
9476                 </actions>
9477             </permacrud>
9478         </class>
9479         
9480         <class id="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">
9481             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
9482                 <field reporter:label="ID" name="id" reporter:datatype="id" />
9483                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9484                 <field reporter:label="Name" name="name" reporter:datatype="text" />
9485                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
9486             </fields>
9487             <links>
9488                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9489             </links>
9490             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9491                 <actions>
9492                     <create permission="ADMIN_PROVIDER">
9493                         <context link="provider" field="owner"/>
9494                     </create>
9495                     <retrieve permission="ADMIN_PROVIDER">
9496                         <context link="provider" field="owner"/>
9497                     </retrieve>
9498                     <update permission="ADMIN_PROVIDER">
9499                         <context link="provider" field="owner"/>
9500                     </update>
9501                     <delete permission="ADMIN_PROVIDER">
9502                         <context link="provider" field="owner"/>
9503                     </delete>
9504                 </actions>
9505             </permacrud>
9506         </class>
9507         
9508         <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">
9509             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9510                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9511                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9512                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9513                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9514                 </fields>
9515                 <links/>
9516         </class>
9517
9518         <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">
9519                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
9520                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
9521                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
9522                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
9523                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
9524                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
9525                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
9526                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
9527                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
9528                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
9529                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
9530                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
9531                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
9532                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
9533                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
9534                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes"/>
9535                 </fields>
9536                 <links>
9537                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9538                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9539                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9540                 </links>
9541         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9542             <actions>
9543                 <create permission="ADMIN_PROVIDER">
9544                     <context link="provider" field="owner"/>
9545                 </create>
9546                 <retrieve permission="ADMIN_PROVIDER">
9547                     <context link="provider" field="owner"/>
9548                 </retrieve>
9549                 <update permission="ADMIN_PROVIDER">
9550                     <context link="provider" field="owner"/>
9551                 </update>
9552                 <delete permission="ADMIN_PROVIDER">
9553                     <context link="provider" field="owner"/>
9554                 </delete>
9555             </actions>
9556         </permacrud>
9557         </class>
9558
9559         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
9560                 oils_obj:fieldmapper="acq::edi_attr" 
9561                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
9562                 <fields oils_persist:primary="key">
9563                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
9564                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9565                 </fields>
9566         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9567             <actions>
9568                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9569                 <retrieve/>
9570                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9571                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9572             </actions>
9573         </permacrud>
9574         </class>
9575         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
9576                 oils_obj:fieldmapper="acq::edi_attr_set" 
9577                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
9578                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
9579                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9580                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9581                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
9582                 </fields>
9583                 <links>
9584                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
9585                 </links>
9586         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9587             <actions>
9588                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9589                 <retrieve/>
9590                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9591                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9592             </actions>
9593         </permacrud>
9594         </class>
9595         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
9596                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
9597                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
9598                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
9599                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9600                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
9601                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
9602                 </fields>
9603                 <links>
9604                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9605                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
9606                 </links>
9607         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9608             <actions>
9609                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9610                 <retrieve/>
9611                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9612                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9613             </actions>
9614         </permacrud>
9615         </class>
9616
9617
9618         <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">
9619                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
9620                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
9621                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
9622                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
9623                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
9624                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
9625                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
9626                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
9627                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
9628                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
9629                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
9630                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
9631                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
9632                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
9633                 </fields>
9634                 <links>
9635                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
9636                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9637                 </links>
9638         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9639             <actions>
9640                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9641                     <context link="account" jump="provider" field="owner"/>
9642                 </retrieve>
9643                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9644                     <context link="account" jump="provider" field="owner"/>
9645                 </update>
9646                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9647                     <context link="account" jump="provider" field="owner"/>
9648                 </delete>
9649             </actions>
9650         </permacrud>
9651         </class>
9652
9653
9654         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
9655                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
9656                         <field name="id" reporter:datatype="id" />
9657                         <field name="parent" reporter:datatype="link"/>
9658                         <field name="owner" reporter:datatype="link"/>
9659                         <field name="create_time" reporter:datatype="timestamp"/>
9660                         <field name="name" reporter:datatype="text"/>
9661                         <field name="shared" reporter:datatype="bool"/>
9662                         <field name="share_with" reporter:datatype="link"/>
9663                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9664                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
9665                 </fields>
9666                 <links>
9667                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9668                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
9669                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
9670                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9671                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
9672                 </links>
9673         </class>
9674         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
9675                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
9676                         <field name="id" reporter:datatype="id" />
9677                         <field name="parent" reporter:datatype="link"/>
9678                         <field name="owner" reporter:datatype="link"/>
9679                         <field name="create_time" reporter:datatype="timestamp"/>
9680                         <field name="name" reporter:datatype="text"/>
9681                         <field name="shared" reporter:datatype="bool"/>
9682                         <field name="share_with" reporter:datatype="link"/>
9683                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9684                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
9685                 </fields>
9686                 <links>
9687                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9688                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
9689                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
9690                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9691                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
9692                 </links>
9693         </class>
9694         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
9695                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
9696                         <field name="id" reporter:datatype="id" />
9697                         <field name="parent" reporter:datatype="link"/>
9698                         <field name="owner" reporter:datatype="link"/>
9699                         <field name="create_time" reporter:datatype="timestamp"/>
9700                         <field name="name" reporter:datatype="text"/>
9701                         <field name="shared" reporter:datatype="bool"/>
9702                         <field name="share_with" reporter:datatype="link"/>
9703                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9704                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9705                 </fields>
9706                 <links>
9707                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9708                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
9709                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
9710                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9711                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
9712                 </links>
9713         </class>
9714         <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">
9715                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
9716                         <field name="id" reporter:datatype="id" />
9717                         <field name="owner" reporter:datatype="link"/>
9718                         <field name="create_time" reporter:datatype="timestamp"/>
9719                         <field name="name" reporter:datatype="text"/>
9720                         <field name="data" reporter:datatype="text"/>
9721                         <field name="folder" reporter:datatype="link"/>
9722                         <field name="description" reporter:datatype="text"/>
9723                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9724                 </fields>
9725                 <links>
9726                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9727                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
9728                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
9729                 </links>
9730         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9731             <actions>
9732                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9733                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9734                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9735                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9736             </actions>
9737         </permacrud>
9738         </class>
9739         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
9740                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
9741                         <field name="id" reporter:datatype="id" />
9742                         <field name="owner" reporter:datatype="link"/>
9743                         <field name="create_time" reporter:datatype="timestamp"/>
9744                         <field name="template" reporter:datatype="link"/>
9745                         <field name="data" reporter:datatype="text"/>
9746                         <field name="folder" reporter:datatype="link"/>
9747                         <field name="recur" reporter:datatype="bool"/>
9748                         <field name="recurrence" reporter:datatype="interval"/>
9749                         <field name="name" reporter:datatype="text"/>
9750                         <field name="description" reporter:datatype="text"/>
9751                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9752                 </fields>
9753                 <links>
9754                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9755                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
9756                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
9757                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
9758                 </links>
9759         </class>
9760         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
9761                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
9762                         <field name="id" reporter:datatype="id" />
9763                         <field name="runner" reporter:datatype="link"/>
9764                         <field name="start_time" reporter:datatype="timestamp"/>
9765                         <field name="complete_time" reporter:datatype="timestamp"/>
9766                         <field name="run_time" reporter:datatype="timestamp"/>
9767                         <field name="email" reporter:datatype="text"/>
9768                         <field name="excel_format" reporter:datatype="bool"/>
9769                         <field name="csv_format" reporter:datatype="bool"/>
9770                         <field name="html_format" reporter:datatype="bool"/>
9771                         <field name="error_code" reporter:datatype="int"/>
9772                         <field name="error_text" reporter:datatype="text"/>
9773                         <field name="report" reporter:datatype="link"/>
9774                         <field name="folder" reporter:datatype="link"/>
9775                         <field name="chart_pie" reporter:datatype="bool"/>
9776                         <field name="chart_bar" reporter:datatype="bool"/>
9777                         <field name="chart_line" reporter:datatype="bool"/>
9778                 </fields>
9779                 <links>
9780                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9781                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9782                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9783                 </links>
9784         </class>
9785         <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">
9786                 <fields oils_persist:primary="id">
9787                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9788                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9789                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9790                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9791                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9792                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9793                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9794                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9795                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9796                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9797                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9798                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9799                 </fields>
9800                 <links>
9801                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9802                 </links>
9803                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9804                         <actions>
9805                                 <retrieve />
9806                         </actions>
9807                 </permacrud>
9808         </class>
9809         <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">
9810                 <fields oils_persist:primary="id">
9811                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9812                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9813                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9814                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9815                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9816                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9817                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9818                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9819                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9820                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9821                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9822                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9823                 </fields>
9824                 <links>
9825                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9826                 </links>
9827         </class>
9828         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9829                 <fields oils_persist:primary="id">
9830                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9831                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9832                         <field reporter:label="Fingerprint" name="fingerprint" />
9833                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9834                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9835                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9836                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9837                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9838                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9839                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9840                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9841                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9842                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9843                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9844                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9845                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9846                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9847                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9848                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9849                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9850                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9851                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9852                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9853                 </fields>
9854                 <links>
9855                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9856                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9857                 </links>
9858         </class>
9859         <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">
9860                 <fields oils_persist:primary="id">
9861                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9862                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9863                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9864                 </fields>
9865                 <links>
9866                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9867                 </links>
9868         </class>
9869         <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">
9870                 <fields oils_persist:primary="id">
9871                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9872                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9873                 </fields>
9874                 <links>
9875                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9876                 </links>
9877         </class>
9878         <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">
9879                 <fields oils_persist:primary="id">
9880                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9881                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9882                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9883                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9884                 </fields>
9885                 <links>
9886                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9887                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9888                 </links>
9889         </class>
9890         <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">
9891                 <fields oils_persist:primary="xact">
9892                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9893                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9894                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9895                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9896                 </fields>
9897                 <links>
9898                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9899                 </links>
9900         </class>
9901         <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">
9902                 <fields oils_persist:primary="xact">
9903                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9904                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9905                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9906                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9907                 </fields>
9908                 <links>
9909                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9910                 </links>
9911         </class>
9912         <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)">
9913                 <fields oils_persist:primary="id">
9914                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9915                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9916                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9917                 </fields>
9918                 <links>
9919                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9920                 </links>
9921         </class>
9922         <class id="erfcc" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::full_circ_count" oils_persist:tablename="extend_reporter.full_circ_count" reporter:label="Total Circulation Count, Including Legacy">
9923                 <fields oils_persist:primary="id">
9924                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9925                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9926                 </fields>
9927                 <links>
9928                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9929                 </links>
9930         </class>
9931         <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">
9932                 <fields oils_persist:primary="bibid">
9933                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
9934                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
9935                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
9936                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
9937                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
9938                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
9939                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
9940                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
9941                 </fields>
9942                 <links>
9943                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
9944                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9945                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9946                 </links>
9947         </class>
9948         <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">
9949                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9950                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9951                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9952                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9953                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9954                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9955                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9956                 </fields>
9957                 <links>
9958                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9959                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9960                 </links>
9961                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9962                         <actions>
9963                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9964                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9965                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9966                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9967                         </actions>
9968                 </permacrud>
9969         </class>
9970         <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">
9971                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9972                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9973                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9974                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9975                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9976                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9977                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9978                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9979                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9980                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9981                 </fields>
9982                 <links>
9983                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9984                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9985                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9986                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9987                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9988                 </links>
9989                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9990                         <actions>
9991                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9992                                         <context link="formula" field="owner"/>
9993                                 </create>
9994                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9995                                         <context link="formula" field="owner"/>
9996                                 </retrieve>
9997                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9998                                         <context link="formula" field="owner"/>
9999                                 </update>
10000                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
10001                                         <context link="formula" field="owner"/>
10002                                 </delete>
10003                         </actions>
10004                 </permacrud>
10005         </class>
10006
10007         <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">
10008                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
10009                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10010                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10011                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10012                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
10013                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10014                 </fields>
10015                 <links>
10016                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10017                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10018                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10019                 </links>
10020                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10021                         <actions>
10022                                 <create permission="CREATE_PURCHASE_ORDER">
10023                                         <context link="formula" field="owner"/>
10024                 </create>
10025                                 <retrieve permission="CREATE_PURCHASE_ORDER">
10026                                         <context link="formula" field="owner"/>
10027                 </retrieve>
10028                                 <update permission="CREATE_PURCHASE_ORDER">
10029                                         <context link="formula" field="owner"/>
10030                 </update>
10031                                 <delete permission="CREATE_PURCHASE_ORDER">
10032                                         <context link="formula" field="owner"/>
10033                 </delete>
10034                         </actions>
10035                 </permacrud>
10036         </class>
10037
10038         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
10039                 <fields oils_persist:primary="id">
10040                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
10041                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10042                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
10043                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
10044                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
10045                 </fields>
10046                 <links>
10047                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10048                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
10049                 </links>
10050         </class>
10051
10052         <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">
10053                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
10054                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10055                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10056                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10057                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10058                 </fields>
10059                 <links>
10060                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10061                 </links>
10062                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10063                         <actions>
10064                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10065                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10066                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10067                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10068                         </actions>
10069                 </permacrud>
10070         </class>
10071
10072         <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">
10073                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
10074                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10075                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10076                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10077                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10078                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
10079                 </fields>
10080                 <links>
10081                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10082                 </links>
10083                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10084                         <actions>
10085                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10086                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10087                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10088                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10089                         </actions>
10090                 </permacrud>
10091         </class>
10092
10093         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
10094                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
10095                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10096                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10097                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10098                 </fields>
10099                 <links>
10100                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10101                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10102                 </links>
10103         </class>
10104
10105         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
10106                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
10107                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10108                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10109                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10110                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10111                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10112                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10113                 </fields>
10114                 <links>
10115                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10116                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
10117                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10118                 </links>
10119         </class>
10120
10121         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
10122                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
10123                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10124                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10125                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
10126                 </fields>
10127                 <links>
10128                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10129                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
10130                 </links>
10131         </class>
10132
10133         <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">
10134                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
10135                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10136                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10137                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10138                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10139                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10140                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10141                 </fields>
10142                 <links>
10143                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10144                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
10145                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10146                 </links>
10147         </class>
10148
10149         <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">
10150                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
10151                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
10152                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10153                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
10154                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10155                 </fields>
10156                 <links>
10157                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10158                 </links>
10159                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10160             <actions>
10161                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10162                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
10163                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10164                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10165             </actions>
10166                 </permacrud>
10167         </class>
10168
10169         <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">
10170                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
10171                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
10172                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
10173                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
10174                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
10175                 </fields>
10176                 <links>
10177                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10178                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
10179                 </links>
10180                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10181                         <actions>
10182                                 <create permission="ADMIN_CLAIM_POLICY">
10183                                         <context link="claim_policy" field="org_unit"/>
10184                 </create>
10185                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
10186                                         <context link="claim_policy" field="org_unit"/>
10187                 </retrieve>
10188                                 <update permission="ADMIN_CLAIM_POLICY">
10189                                         <context link="claim_policy" field="org_unit"/>
10190                 </update>
10191                                 <delete permission="ADMIN_CLAIM_POLICY">
10192                                         <context link="claim_policy" field="org_unit"/>
10193                 </delete>
10194                         </actions>
10195                 </permacrud>
10196         </class>
10197
10198     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
10199         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
10200             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10201             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
10202             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10203             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
10204             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
10205             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
10206             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
10207             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
10208             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
10209             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
10210             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
10211             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
10212             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
10213             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
10214             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10215             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
10216         </fields>
10217         <links>
10218             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
10219         </links>
10220     </class>
10221
10222     <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">
10223         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
10224             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10225             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10226             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10227             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10228             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10229         </fields>
10230     </class>
10231
10232     <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">
10233         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10234             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10235             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10236             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10237             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10238             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10239             <field reporter:label="City" name="city" reporter:datatype="text"/>
10240             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10241             <field reporter:label="State" name="state" reporter:datatype="text"/>
10242             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10243             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10244             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10245         </fields>
10246     </class>
10247
10248     <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">
10249         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10250             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10251             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10252             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10253             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10254             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10255             <field reporter:label="City" name="city" reporter:datatype="text"/>
10256             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10257             <field reporter:label="State" name="state" reporter:datatype="text"/>
10258             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10259             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10260             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10261         </fields>
10262     </class>
10263
10264     <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">
10265         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
10266             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10267             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10268             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10269             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
10270             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
10271             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10272         </fields>
10273     </class>
10274
10275     <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">
10276         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
10277             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10278             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10279             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10280             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
10281             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
10282             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10283         </fields>
10284     </class>
10285
10286         <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">
10287                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
10288                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
10289                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10290                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
10291                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
10292                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
10293                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
10294                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
10295                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
10296                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10297                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10298                 </fields>
10299                 <links>
10300                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10301                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10302                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
10303                 </links>
10304                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10305                         <actions>
10306                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10307                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10308                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10309                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10310                         </actions>
10311                 </permacrud>
10312         </class>
10313
10314         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
10315                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
10316                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
10317                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10318                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10319                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
10320                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
10321                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
10322                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
10323                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
10324                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
10325                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
10326                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
10327                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
10328                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
10329                 </fields>
10330                 <links>
10331                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10332                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10333                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10334                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
10335                 </links>
10336                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10337                         <actions>
10338                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10339                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10340                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10341                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10342                         </actions>
10343                 </permacrud>
10344         </class>
10345
10346         <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">
10347                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
10348                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
10349                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
10350                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
10351                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
10352                 </fields>
10353                 <links>
10354                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
10355                 </links>
10356                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
10357                         <actions>
10358                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10359                     <context link="fieldset" field="owning_lib"/>
10360                 </create>
10361                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10362                     <context link="fieldset" field="owning_lib"/>
10363                 </retrieve>
10364                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10365                     <context link="fieldset" field="owning_lib"/>
10366                 </update>
10367                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10368                     <context link="fieldset" field="owning_lib"/>
10369                 </delete>
10370                         </actions>
10371                 </permacrud>
10372         </class>
10373
10374     <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">
10375         <fields>
10376             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10377             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10378             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10379         </fields>
10380                 <links>
10381                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10382                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10383                 </links>
10384     </class>
10385
10386     <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">
10387         <fields>
10388             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10389             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
10390         </fields>
10391                 <links>
10392                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10393                 </links>
10394     </class>
10395
10396     <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">
10397         <fields>
10398             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10399             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10400             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10401         </fields>
10402                 <links>
10403                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10404                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10405                 </links>
10406     </class>
10407
10408     <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">
10409         <fields>
10410             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10411             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
10412         </fields>
10413                 <links>
10414                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10415                 </links>
10416     </class>
10417
10418     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
10419                 <oils_persist:source_definition>
10420
10421             SELECT  DISTINCT l.*
10422               FROM  action.unfulfilled_hold_loops l
10423                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
10424               WHERE l.count = m.max
10425
10426                 </oils_persist:source_definition>
10427         <fields>
10428             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10429             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10430             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10431         </fields>
10432                 <links>
10433                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10434                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10435                 </links>
10436     </class>
10437
10438         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
10439                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
10440                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
10441                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
10442                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
10443                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
10444                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
10445                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
10446                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
10447                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
10448                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
10449                 </fields>
10450                 <links>
10451                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
10452                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
10453                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
10454                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
10455                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
10456                 </links>
10457         </class>
10458
10459         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
10460                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
10461                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
10462                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
10463                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10464                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
10465                 </fields>
10466                 <links>
10467                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
10468                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
10469                 </links>
10470         </class>
10471
10472         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
10473                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
10474                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
10475                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
10476                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
10477                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
10478                 </fields>
10479                 <links>
10480                 </links>
10481         </class>
10482
10483         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
10484                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
10485                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
10486                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
10487                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10488                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
10489                 </fields>
10490                 <links>
10491                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
10492                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
10493                 </links>
10494         </class>
10495         
10496         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
10497                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
10498                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
10499                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
10500                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
10501                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
10502                 </fields>
10503                 <links>
10504                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
10505                 </links>
10506         </class>
10507         
10508         <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">
10509                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
10510                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
10511                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10512                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10513                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
10514                 </fields>
10515                 <links>
10516                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10517                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
10518                 </links>
10519         </class>
10520
10521         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
10522                 <fields oils_persist:primary="name">
10523                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
10524                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
10525                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
10526                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10527                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
10528                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
10529                 </fields>
10530                 <links>
10531                 </links>
10532         </class>
10533
10534         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
10535                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10536                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10537                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
10538                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10539                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10540                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10541                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10542                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10543                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10544                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10545                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10546                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10547                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10548                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10549                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10550                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10551                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10552                 </fields>
10553                 <links>
10554                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10555                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10556                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10557                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10558                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10559                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10560                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10561                 </links>
10562         </class>
10563
10564         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
10565                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
10566                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
10567                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10568                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10569                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
10570                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
10571                 </fields>
10572                 <links>
10573                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10574                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
10575                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
10576                 </links>
10577         </class>
10578
10579         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
10580                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
10581                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
10582                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
10583                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
10584                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
10585                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
10586                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
10587                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10588                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
10589                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10590                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
10591                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
10592                 </fields>
10593                 <links>
10594                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10595                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
10596                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
10597                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
10598                 </links>
10599         </class>
10600
10601         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
10602                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
10603                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
10604                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
10605                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10606                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10607                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
10608                 </fields>
10609                 <links>
10610                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
10611                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
10612                 </links>
10613         </class>
10614
10615         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
10616                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
10617                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
10618                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10619                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10620                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10621                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
10622                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
10623                 </fields>
10624                 <links>
10625                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10626                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10627                 </links>
10628         </class>
10629
10630         <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">
10631                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
10632                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
10633                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10634                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10635                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10636                 </fields>
10637                 <links>
10638                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10639                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10640                 </links>
10641         </class>
10642
10643         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
10644                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10645                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10646                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10647                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10648                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10649                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10650                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10651                 </fields>
10652                 <links>
10653                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10654                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10655                 </links>
10656         </class>
10657
10658         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
10659                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10660                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10661                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10662                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10663                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10664                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10665                 </fields>
10666                 <links>
10667                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10668                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10669                 </links>
10670         </class>
10671
10672         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
10673                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10674                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10675                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10676                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10677                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10678                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10679                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10680                 </fields>
10681                 <links>
10682                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10683                 </links>
10684         </class>
10685
10686         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
10687                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10688                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10689                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10690                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10691                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10692                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10693                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10694                 </fields>
10695                 <links>
10696                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10697                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10698                 </links>
10699         </class>
10700
10701         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
10702                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10703                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10704                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10705                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10706                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10707                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10708                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10709                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10710                 </fields>
10711                 <links>
10712                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10713                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10714                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10715                 </links>
10716         </class>
10717
10718         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
10719                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10720                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10721                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10722                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10723                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10724                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10725                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10726                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10727                 </fields>
10728                 <links>
10729                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10730                 </links>
10731         </class>
10732
10733         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
10734                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10735                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10736                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10737                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10738                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10739                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10740                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10741                 </fields>
10742                 <links>
10743                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10744                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10745                 </links>
10746         </class>
10747
10748         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
10749                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10750                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10751                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10752                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10753                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10754                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10755                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10756                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10757                 </fields>
10758                 <links>
10759                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10760                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10761                 </links>
10762         </class>
10763
10764         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
10765                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10766                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10767                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10768                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10769                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10770                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10771                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10772                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10773                 </fields>
10774                 <links>
10775                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10776                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10777                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10778                 </links>
10779         </class>
10780
10781         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
10782                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10783                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10784                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10785                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10786                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10787                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10788                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10789                 </fields>
10790                 <links>
10791                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10792                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10793                 </links>
10794         </class>
10795
10796         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
10797                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10798                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10799                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10800                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10801                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10802                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10803                 </fields>
10804                 <links>
10805                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10806                 </links>
10807         </class>
10808
10809         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
10810                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10811                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10812                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10813                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10814                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10815                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10816                 </fields>
10817                 <links>
10818                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10819                 </links>
10820         </class>
10821
10822         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
10823                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10824                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10825                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10826                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10827                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10828                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10829                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10830                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10831                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10832                 </fields>
10833                 <links>
10834                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10835                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10836                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10837                 </links>
10838         </class>
10839
10840         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
10841                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10842                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10843                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10844                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10845                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10846                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10847                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10848                 </fields>
10849                 <links>
10850                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10851                 </links>
10852         </class>
10853
10854         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
10855                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10856                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10857                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10858                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10859                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10860                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10861                 </fields>
10862                 <links>
10863                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10864                 </links>
10865         </class>
10866
10867         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10868                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10869                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10870                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10871                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10872                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10873                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10874                 </fields>
10875                 <links>
10876                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10877                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10878                 </links>
10879         </class>
10880
10881         <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">
10882                 <fields oils_persist:primary="id">
10883                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10884                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10885                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10886                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10887                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10888                 </fields>
10889                 <links>
10890                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10891                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10892                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10893                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10894                 </links>
10895         </class>
10896
10897         <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">
10898                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10899                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10900                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10901                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10902                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10903                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10904                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10905                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10906                 </fields>
10907                 <links/>
10908                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10909                         <actions>
10910                                 <retrieve/>
10911                         </actions>
10912                 </permacrud>
10913         </class>
10914
10915         <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">
10916                 <fields oils_persist:primary="ptype_key">
10917                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10918                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10919                 </fields>
10920                 <links/>
10921                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10922                         <actions>
10923                                 <retrieve/>
10924                         </actions>
10925                 </permacrud>
10926         </class>
10927
10928         <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">
10929                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10930                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10931                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10932                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10933                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10934                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10935                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10936                 </fields>
10937                 <links>
10938                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10939                 </links>
10940                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10941                         <actions>
10942                                 <retrieve/>
10943                         </actions>
10944                 </permacrud>
10945         </class>
10946
10947         <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">
10948                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10949                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10950                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10951                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10952                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10953                 </fields>
10954                 <links>
10955                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10956                 </links>
10957                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10958                         <actions>
10959                                 <retrieve/>
10960                         </actions>
10961                 </permacrud>
10962         </class>
10963
10964     <class
10965         id="uvs"
10966         controller="open-ils.cstore open-ils.pcrud"
10967         oils_obj:fieldmapper="url_verify::session"
10968         oils_persist:tablename="url_verify.session"
10969         reporter:label="URL Verification Session"
10970     >
10971         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10972             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10973             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10974                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10975             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10976             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10977             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10978             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10979             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10980             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10981         </fields>
10982
10983         <links>
10984             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10985             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10986             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10987             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10988             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10989         </links>
10990
10991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10992             <actions>
10993                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10994             </actions>
10995         </permacrud>
10996
10997     </class>
10998
10999     <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">
11000         <oils_persist:source_definition>
11001             SELECT
11002                 cbrebi.id AS id,  -- so we can have a pkey in our view
11003                 uvs.id AS session,
11004                 uvs.owning_lib,
11005                 cbrebi.target_biblio_record_entry
11006             FROM url_verify.session uvs
11007             JOIN container.biblio_record_entry_bucket cbreb
11008                 ON (uvs.container = cbreb.id)
11009             JOIN container.biblio_record_entry_bucket_item cbrebi
11010                 ON (cbrebi.bucket = cbreb.id)
11011         </oils_persist:source_definition>
11012         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
11013             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
11014             <field reporter:label="Session" name="session" reporter:datatype="link" />
11015             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
11016             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
11017         </fields>
11018         <links>
11019             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
11020             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
11021             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
11022         </links>
11023         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11024             <actions>
11025                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
11026             </actions>
11027         </permacrud>
11028     </class>
11029
11030     <class
11031         id="uvus"
11032         controller="open-ils.cstore open-ils.pcrud"
11033         oils_obj:fieldmapper="url_verify::url_selector"
11034         oils_persist:tablename="url_verify.url_selector"
11035         reporter:label="URL Verification URL Selector"
11036     >
11037         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
11038             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
11039             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
11040                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11041             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
11042         </fields>
11043
11044         <links>
11045             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11046             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
11047         </links>
11048
11049         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11050             <actions>
11051                 <create permission="URL_VERIFY">
11052                     <context link="session" field="owning_lib"/>
11053                 </create>
11054                 <retrieve permission="URL_VERIFY">
11055                     <context link="session" field="owning_lib"/>
11056                 </retrieve>
11057                 <update permission="URL_VERIFY">
11058                     <context link="session" field="owning_lib"/>
11059                 </update>
11060                 <delete permission="URL_VERIFY">
11061                     <context link="session" field="owning_lib"/>
11062                 </delete>
11063             </actions>
11064         </permacrud>
11065
11066     </class>
11067
11068     <class
11069         id="uvu"
11070         controller="open-ils.cstore open-ils.pcrud"
11071         oils_obj:fieldmapper="url_verify::url"
11072         oils_persist:tablename="url_verify.url"
11073         reporter:label="URL Verification URL"
11074     >
11075         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
11076             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
11077                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
11078                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
11079                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11080                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
11081             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11082             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11083             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
11084             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
11085             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
11086             <field reporter:label="Host" name="host" reporter:datatype="text"/>
11087             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
11088             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
11089             <field reporter:label="Path" name="path" reporter:datatype="text"/>
11090             <field reporter:label="Page" name="page" reporter:datatype="text"/>
11091             <field reporter:label="Query" name="query" reporter:datatype="text"/>
11092             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
11093             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
11094         </fields>
11095
11096         <links>
11097             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
11098             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
11099             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11100             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
11101             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
11102         </links>
11103
11104         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11105             <actions>
11106                 <create permission="URL_VERIFY">
11107                     <context link="session" field="owning_lib"/>
11108                 </create>
11109                 <retrieve permission="URL_VERIFY">
11110                     <context link="session" field="owning_lib"/>
11111                 </retrieve>
11112                 <update permission="URL_VERIFY">
11113                     <context link="session" field="owning_lib"/>
11114                 </update>
11115                 <delete permission="URL_VERIFY">
11116                     <context link="session" field="owning_lib"/>
11117                 </delete>
11118             </actions>
11119         </permacrud>
11120
11121     </class>
11122
11123     <class
11124         id="uvva"
11125         controller="open-ils.cstore open-ils.pcrud"
11126         oils_obj:fieldmapper="url_verify::verification_attempt"
11127         oils_persist:tablename="url_verify.verification_attempt"
11128         reporter:label="URL Verification Attempt"
11129     >
11130         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
11131             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
11132                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
11133                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
11134             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
11135             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
11136         </fields>
11137
11138         <links>
11139             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11140             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11141         </links>
11142
11143         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11144             <actions>
11145                 <create permission="URL_VERIFY">
11146                     <context link="session" field="owning_lib"/>
11147                 </create>
11148                 <retrieve permission="URL_VERIFY">
11149                     <context link="session" field="owning_lib"/>
11150                 </retrieve>
11151                 <update permission="URL_VERIFY">
11152                     <context link="session" field="owning_lib"/>
11153                 </update>
11154                 <delete permission="URL_VERIFY">
11155                     <context link="session" field="owning_lib"/>
11156                 </delete>
11157             </actions>
11158         </permacrud>
11159
11160     </class>
11161
11162     <class
11163         id="uvuv"
11164         controller="open-ils.cstore open-ils.pcrud"
11165         oils_obj:fieldmapper="url_verify::url_verification"
11166         oils_persist:tablename="url_verify.url_verification"
11167         reporter:label="URL Verification"
11168     >
11169         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
11170             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
11171                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
11172                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
11173             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
11174             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
11175             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
11176             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
11177                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
11178         </fields>
11179
11180         <links>
11181             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
11182             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
11183             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
11184         </links>
11185
11186         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11187             <actions>
11188                 <create permission="URL_VERIFY">
11189                     <context link="attempt" jump="session" field="owning_lib"/>
11190                 </create>
11191                 <retrieve permission="URL_VERIFY">
11192                     <context link="attempt" jump="session" field="owning_lib"/>
11193                 </retrieve>
11194                 <update permission="URL_VERIFY">
11195                     <context link="attempt" jump="session" field="owning_lib"/>
11196                 </update>
11197                 <delete permission="URL_VERIFY">
11198                     <context link="attempt" jump="session" field="owning_lib"/>
11199                 </delete>
11200             </actions>
11201         </permacrud>
11202
11203     </class>
11204
11205         <class
11206                 id="cfdi"
11207                 controller="open-ils.cstore open-ils.pcrud"
11208                 oils_obj:fieldmapper="config::filter_dialog_interface"
11209                 oils_persist:tablename="config.filter_dialog_interface"
11210                 reporter:label="FilterDialog Interface">
11211                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
11212                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
11213                         <field reporter:label="Description" name="description" reporter:datatype="text" />
11214                 </fields>
11215                 <links>
11216                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
11217                 </links>
11218                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11219                         <actions>
11220                                 <retrieve />
11221                         </actions>
11222                 </permacrud>
11223         </class>
11224
11225         <class
11226                 id="cfdfs"
11227                 controller="open-ils.cstore open-ils.pcrud"
11228                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
11229                 oils_persist:tablename="config.filter_dialog_filter_set"
11230                 reporter:label="FilterDialog Filter Set">
11231                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
11232                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11233                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11234                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11235                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11236                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
11237                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11238                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
11239                 </fields>
11240                 <links>
11241                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11242                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11243                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
11244                 </links>
11245                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11246                         <actions>
11247                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11248                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11249                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11250                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11251                         </actions>
11252                 </permacrud>
11253
11254         </class>
11255
11256         <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">
11257                 <fields oils_persist:primary="code">
11258                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
11259                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
11260                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
11261                 </fields>
11262                 <links/>
11263                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11264                         <actions>
11265                                 <retrieve/>
11266                         </actions>
11267                 </permacrud>
11268         </class>
11269
11270         <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">
11271                 <oils_persist:source_definition>
11272
11273             SELECT  b.id,
11274                     MAX(dcp.edit_date) AS last_delete_date
11275              FROM   biblio.record_entry b
11276                     JOIN asset.call_number cn ON (cn.record = b.id)
11277                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
11278              WHERE  NOT b.deleted
11279              GROUP BY b.id
11280              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
11281
11282                 </oils_persist:source_definition>
11283                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11284                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11285                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
11286                 </fields>
11287                 <links>
11288                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11289                 </links>
11290                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11291                         <actions>
11292                                 <retrieve/>
11293                         </actions>
11294                 </permacrud>
11295         </class>
11296
11297         <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">
11298                 <oils_persist:source_definition>
11299
11300             -- -- 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.
11301             -- -- 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
11302             -- -- may not.
11303             -- SELECT
11304             --     bre.id AS bib_id,
11305             --     COALESCE( z.copy_count, 0 ) AS copy_count,
11306             --     COALESCE( z.hold_count, 0 ) AS hold_count,
11307             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
11308             -- FROM (
11309                 SELECT
11310                     y.bre AS id,
11311                     COALESCE( x.copy_count, 0 ) AS copy_count,
11312                     y.hold_count AS hold_count,
11313                     (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
11314                 FROM (
11315                         SELECT
11316                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
11317                             COUNT(*) AS hold_count
11318                         FROM action.hold_request h
11319                         WHERE
11320                             cancel_time IS NULL
11321                             AND fulfillment_time IS NULL
11322                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
11323                         GROUP BY 1
11324                     )y LEFT JOIN (
11325                         SELECT 
11326                             (SELECT id
11327                                 FROM biblio.record_entry 
11328                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
11329                             ) AS bre, 
11330                             COUNT(*) AS copy_count
11331                         FROM asset.copy
11332                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
11333                         WHERE copy.holdable 
11334                             AND NOT copy.deleted 
11335                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
11336                         GROUP BY 1
11337                     )x ON x.bre = y.bre
11338                 -- )z RIGHT JOIN (
11339                 --     SELECT id
11340                 --     FROM biblio.record_entry
11341                 --     WHERE NOT deleted
11342                 -- )bre ON (z.bib_id = bre.id)
11343                 
11344
11345                 </oils_persist:source_definition>
11346                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11347                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11348                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
11349                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
11350                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
11351                 </fields>
11352                 <links>
11353                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11354                 </links>
11355                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11356                         <actions>
11357                                 <retrieve/>
11358                         </actions>
11359                 </permacrud>
11360         </class>
11361
11362         <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">
11363                 <oils_persist:source_definition>
11364             SELECT *,
11365                 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,
11366                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
11367             FROM
11368                 (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
11369                     FROM
11370                         action.hold_request ahr
11371                         JOIN reporter.hold_request_record rhrr USING (id)
11372                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11373                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
11374                     WHERE
11375                         ahr.cancel_time IS NULL
11376                         AND ahr.fulfillment_time IS NULL
11377                     GROUP BY bib_record, pickup_lib
11378                 )x
11379                 JOIN
11380                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11381                     FROM
11382                         action.hold_request ahr
11383                         JOIN reporter.hold_request_record rhrr USING (id)
11384                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11385                     WHERE
11386                         ahr.cancel_time IS NULL
11387                         AND ahr.fulfillment_time IS NULL
11388                     GROUP BY bib_record
11389                 )y
11390                 USING (id)
11391                 </oils_persist:source_definition>
11392                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11393                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11394                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
11395                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
11396                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
11397                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11398                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11399                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
11400                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11401                 </fields>
11402                 <links>
11403                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11404                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
11405                 </links>
11406                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11407                         <actions>
11408                                 <retrieve/>
11409                         </actions>
11410                 </permacrud>
11411         </class>
11412
11413         <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) ">
11414                 <oils_persist:source_definition>
11415             WITH counts_at_ou AS (
11416                 SELECT  rhrr.bib_record AS id,
11417                         aou.id AS pickup_lib_or_desc,
11418                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
11419                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
11420                   FROM  actor.org_unit aou
11421                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
11422                         action.hold_request ahr
11423                         JOIN reporter.hold_request_record rhrr USING (id)
11424                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11425                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
11426                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
11427                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
11428                         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
11429                   GROUP BY 1, 2
11430             )
11431             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
11432                    y.holds_everywhere, y.copy_count_everywhere,
11433                 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,
11434                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
11435             FROM counts_at_ou x
11436                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11437                     FROM
11438                         action.hold_request ahr
11439                         JOIN reporter.hold_request_record rhrr USING (id)
11440                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11441                     WHERE
11442                         ahr.cancel_time IS NULL
11443                         AND ahr.fulfillment_time IS NULL
11444                     GROUP BY bib_record
11445                 )y
11446                 USING (id)
11447                 </oils_persist:source_definition>
11448                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11449                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11450                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
11451                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
11452                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
11453                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11454                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11455                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
11456                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11457                 </fields>
11458                 <links>
11459                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11460                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
11461                 </links>
11462                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11463                         <actions>
11464                                 <retrieve/>
11465                         </actions>
11466                 </permacrud>
11467         </class>
11468
11469         <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">
11470                 <oils_persist:source_definition>
11471             SELECT
11472                 ac.id,
11473                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
11474                 MAX(actac.xact_start) AS last_circ
11475             FROM asset.copy ac
11476                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11477             GROUP BY ac.id
11478
11479             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
11480             --SELECT
11481             --    ac.id,
11482             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
11483             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
11484             --FROM asset.copy ac
11485             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11486             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
11487             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
11488                 </oils_persist:source_definition>
11489                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11490                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
11491                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
11492                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
11493                 </fields>
11494                 <links>
11495                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11496                 </links>
11497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11498                         <actions>
11499                                 <retrieve/>
11500                         </actions>
11501                 </permacrud>
11502         </class>
11503
11504         <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">
11505                 <fields oils_persist:primary="id">
11506                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
11507                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
11508                 </fields>
11509                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11510                         <actions>
11511                                 <retrieve/>
11512                         </actions>
11513                 </permacrud>
11514         </class>
11515
11516         <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">
11517                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
11518                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11519                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
11520                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11521                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11522                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11523                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11524                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11525                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
11526                 </fields>
11527                 <links>
11528                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
11529                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11530                 </links>
11531                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11532                         <actions>
11533                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11534                                 <retrieve/>
11535                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11536                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11537                         </actions>
11538                 </permacrud>
11539         </class>
11540
11541         <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">
11542                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
11543                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11544                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
11545                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11546                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11547                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11548                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11549                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11550                 </fields>
11551                 <links>
11552                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
11553                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11554                 </links>
11555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11556                         <actions>
11557                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11558                                 <retrieve/>
11559                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11560                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11561                         </actions>
11562                 </permacrud>
11563         </class>
11564
11565
11566         <!-- ********************************************************************************************************************* -->
11567         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
11568         <!-- ********************************************************************************************************************* -->
11569         <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">
11570                 <fields oils_persist:primary="id">
11571                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
11572                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
11573                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
11574                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11575                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
11576                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
11577                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11578                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
11579                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
11580                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
11581                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
11582                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
11583                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
11584                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
11585                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11586                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
11587                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
11588                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
11589                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
11590                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
11591                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
11592                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
11593                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
11594                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
11595                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
11596                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
11597                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
11598                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
11599                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
11600                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11601                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11602                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11603                 </fields>
11604                 <links>
11605                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11606                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
11607                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
11608                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
11609                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
11610                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
11611                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
11612                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
11613                 </links>
11614         </class>
11615
11616         <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">
11617                 <fields oils_persist:primary="id">
11618                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11619                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11620                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11621                 </fields>
11622                 <links>
11623                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11624                 </links>
11625         </class>
11626
11627         <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">
11628                 <fields oils_persist:primary="id">
11629                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11630                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11631                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11632                 </fields>
11633                 <links>
11634                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11635                 </links>
11636         </class>
11637
11638         <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">
11639                 <fields oils_persist:primary="id">
11640                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
11641
11642                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
11643                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
11644                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
11645
11646                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
11647                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
11648                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
11649
11650                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
11651                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
11652
11653                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11654                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
11655                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
11656
11657                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
11658                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
11659
11660                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
11661                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
11662                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
11663
11664                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
11665                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
11666                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
11667
11668                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11669                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
11670                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
11671                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
11672
11673                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
11674                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
11675
11676                 </fields>
11677                 <links>
11678                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
11679                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11680                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
11681                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
11682                 </links>
11683         </class>
11684
11685         <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">
11686                 <oils_persist:source_definition>
11687
11688             SELECT
11689                 po.ordering_agency AS ordering_agency,
11690                 po.id AS purchase_order,
11691                 li.id AS lineitem,
11692                 lid.id AS lineitem_detail,
11693                 cpa.id AS claim_policy_action
11694             FROM
11695                 acq.lineitem_detail lid
11696                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
11697                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
11698                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
11699                 JOIN acq.claim_policy_action cpa ON (
11700                     cpa.claim_policy = cp.id
11701
11702                     -- we only care about claim policy actions whose claim
11703                     -- interval we'd reached or exceeded
11704                     AND (NOW() - cpa.action_interval) &gt; po.order_date
11705
11706                     -- filter out all claim policy actions where claim events
11707                     -- have occurred on or after the action's action_interval
11708                     AND NOT EXISTS (
11709                         SELECT 1
11710                         FROM
11711                             acq.claim_event evt
11712                             JOIN acq.claim claim ON (
11713                                 claim.id = evt.claim
11714                                 AND claim.lineitem_detail = lid.id
11715                             )
11716                         WHERE
11717                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
11718                     )
11719                 )
11720             WHERE
11721                 lid.cancel_reason IS NULL
11722                 AND li.cancel_reason IS NULL -- belt/suspenders
11723                 AND po.cancel_reason IS NULL -- belt/suspenders
11724                 AND lid.recv_time IS NULL
11725                 AND po.state = 'on-order'
11726             ORDER BY 1, 2, 3, 4, 5
11727
11728                 </oils_persist:source_definition>
11729                 <fields>
11730                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
11731                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
11732                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11733                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11734                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
11735                 </fields>
11736                 <links>
11737                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
11738                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
11739                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11740                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11741                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
11742                 </links>
11743         </class>
11744         <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">
11745                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11746                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11747                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11748                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11749                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11750                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11751                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11752                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11753                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11754                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11755                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11756                 </fields>
11757                 <links>
11758                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11759                 </links>
11760     </class>
11761         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
11762                 <oils_persist:source_definition>
11763             SELECT * FROM acq.lineitem_summary 
11764                                 WHERE item_count > (invoice_count + cancel_count)
11765         </oils_persist:source_definition>
11766                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11767                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11768                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11769                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11770                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11771                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11772                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11773                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11774                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11775                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11776                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11777                 </fields>
11778                 <links>
11779                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11780                 </links>
11781     </class>
11782         <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">
11783                 <oils_persist:source_definition>
11784
11785                         SELECT  t.*
11786                           FROM  action.transit_copy t
11787                                 JOIN actor.org_unit AS s ON (t.source = s.id)
11788                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
11789                           WHERE s.parent_ou &lt;&gt; d.parent_ou
11790
11791                 </oils_persist:source_definition>
11792                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
11793                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
11794                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
11795                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
11796                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
11797                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
11798                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
11799                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
11800                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
11801                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
11802                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
11803                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
11804                 </fields>
11805                 <links>
11806                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
11807                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
11808                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
11809                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
11810                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11811                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
11812                 </links>
11813         </class>
11814
11815     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
11816                 <oils_persist:source_definition>
11817
11818         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
11819                 SELECT
11820                         cp.id as copy,
11821                         COUNT(circ.id),
11822                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11823                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11824                 FROM
11825                         asset.copy cp
11826                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
11827                 GROUP BY 1, 3, 4
11828                 UNION ALL
11829                 SELECT
11830                         cp.id as copy,
11831                         COUNT(circ.id),
11832                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11833                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11834                 FROM
11835                         asset.copy cp
11836                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
11837                 GROUP BY 1, 3, 4
11838                 UNION ALL
11839                 SELECT
11840                         id as copy,
11841                         circ_count,
11842                         -1 AS year,
11843                         false as is_renewal
11844                 FROM
11845                         extend_reporter.legacy_circ_count
11846         )x GROUP BY 1, 3, 4
11847
11848                 </oils_persist:source_definition>
11849         <fields>
11850             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
11851             <field reporter:label="Count" name="count" reporter:datatype="int"/>
11852             <field reporter:label="Year" name="year" reporter:datatype="int"/>
11853             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
11854         </fields>
11855                 <links>
11856                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11857                 </links>
11858                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11859                         <actions>
11860                                 <retrieve/>
11861                         </actions>
11862                 </permacrud>
11863     </class>
11864
11865         <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">
11866                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
11867                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
11868                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
11869                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
11870                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
11871                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
11872                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
11873                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
11874                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
11875                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
11876                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
11877                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
11878                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
11879                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
11880                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
11881                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
11882                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
11883                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
11884                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
11885                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
11886                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
11887                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
11888                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
11889                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
11890                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
11891                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
11892                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
11893                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
11894                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
11895                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
11896                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
11897                 </fields>
11898                 <links>
11899                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
11900                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
11901                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
11902                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11903                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
11904                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11905                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11906                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
11907                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
11908                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
11909                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
11910                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
11911                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
11912                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
11913                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
11914                 </links>
11915         </class>
11916
11917     <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">
11918         <fields oils_persist:primary="id">
11919             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11920             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11921             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11922             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11923             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11924             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11925             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11926             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11927             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11928             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11929             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11930             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11931             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11932             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11933             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11934             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11935             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11936             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11937             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11938             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11939             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11940             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11941             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11942             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11943             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11944             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11945             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11946             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11947             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11948             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11949             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11950             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11951             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11952             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11953         </fields>
11954         <links>
11955             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11956             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11957             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11958             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11959             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11960             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11961             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11962             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11963         </links>
11964     </class>
11965
11966     <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">
11967         <fields oils_persist:primary="id">
11968             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11969             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11970             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11971             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11972         </fields>
11973         <links>
11974             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11975             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11976         </links>
11977     </class>
11978
11979     <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">
11980         <fields oils_persist:primary="owning_lib">
11981             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11982             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11983             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11984         </fields>
11985         <links>
11986             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11987         </links>
11988     </class>
11989
11990     <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">
11991         <fields oils_persist:primary="id">
11992             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11993             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11994             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11995             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11996             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11997         </fields>
11998         <links>
11999             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12000             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12001             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12002         </links>
12003     </class>
12004
12005     <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">
12006         <fields oils_persist:primary="circ_lib">
12007             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12008             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12009             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12010             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12011         </fields>
12012         <links>
12013             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12014             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12015         </links>
12016     </class>
12017
12018     <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">
12019         <fields oils_persist:primary="id">
12020             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12021             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12022             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12023             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12024             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12025         </fields>
12026         <links>
12027             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12028             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12029             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12030         </links>
12031     </class>
12032
12033     <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">
12034         <fields oils_persist:primary="home_ou">
12035             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12036             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12037             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12038             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12039         </fields>
12040         <links>
12041             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12042             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12043         </links>
12044     </class>
12045         <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">
12046                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
12047                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
12048                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
12049                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
12050                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
12051                 </fields>
12052                 <links>
12053                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12054                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
12055                 </links>
12056                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12057                         <actions>
12058                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12059                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
12060                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12061                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12062                         </actions>
12063                 </permacrud>
12064         </class>
12065         <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">
12066                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
12067                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
12068                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
12069                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
12070                 </fields>
12071                 <links>
12072                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
12073                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
12074                         </links>
12075                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12076                 <actions>
12077                                 <create permission="ADMIN_ACQ_FUND_TAG">
12078                                         <context link="tag" field="owner"/>
12079                                 </create>
12080                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
12081                                         <context link="tag" field="owner"/>
12082                                 </retrieve>
12083                                 <update permission="ADMIN_ACQ_FUND_TAG">
12084                                         <context link="tag" field="owner"/>
12085                                 </update>
12086                                 <delete permission="ADMIN_ACQ_FUND_TAG">
12087                                         <context link="tag" field="owner"/>
12088                                 </delete>
12089                         </actions>
12090                 </permacrud>
12091         </class>
12092         <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">
12093                 <oils_persist:source_definition><![CDATA[
12094                 SELECT
12095                         poi.purchase_order AS purchase_order,
12096                         ii.invoice AS invoice,
12097                         NULL AS lineitem,
12098                         poi.id AS po_item,
12099                         NULL AS picklist
12100                 FROM
12101                         acq.po_item poi
12102                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
12103                 UNION SELECT
12104                         jub.purchase_order AS purchase_order,
12105                         ie.invoice AS invoice,
12106                         jub.id AS lineitem,
12107                         NULL AS po_item,
12108                         jub.picklist AS picklist
12109                 FROM
12110                         acq.lineitem jub
12111                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
12112                 UNION SELECT
12113                         ii.purchase_order AS purchase_order,
12114                         ii.invoice AS invoice,
12115                         NULL AS lineitem,
12116                         NULL AS po_item,
12117                         NULL AS picklist
12118                 FROM
12119                         acq.invoice_item ii
12120                 WHERE ii.po_item IS NULL
12121                 UNION SELECT
12122                         ie.purchase_order AS purchase_order,
12123                         ie.invoice AS invoice,
12124                         NULL AS lineitem,
12125                         NULL AS po_item,
12126                         NULL AS picklist
12127                 FROM
12128                         acq.invoice_entry ie
12129                 WHERE ie.lineitem IS NULL
12130                 UNION SELECT
12131                         NULL AS purchase_order,
12132                         NULL AS invoice,
12133                         jub.id AS lineitem,
12134                         NULL AS po_item,
12135                         jub.picklist AS picklist
12136                 FROM
12137                         acq.lineitem jub
12138                 WHERE jub.purchase_order IS NULL
12139                 ]]></oils_persist:source_definition>
12140                 <fields>
12141                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
12142                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
12143                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
12144                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
12145                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
12146                 </fields>
12147                 <links>
12148                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
12149                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
12150                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
12151                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
12152                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
12153                 </links>
12154         </class>
12155         <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">
12156                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
12157                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12158                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
12159                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
12160                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
12161                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
12162                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12163                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
12164                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
12165                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
12166                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
12167                 </fields>
12168                 <links>
12169                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
12170                 </links>
12171                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12172                         <actions>
12173                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12174                                 <retrieve/>
12175                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12176                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12177                         </actions>
12178                 </permacrud>
12179         </class>
12180
12181         <class id="coustl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type_log" oils_persist:tablename="config.org_unit_setting_type_log" reporter:label="Organizational Unit Setting Type Log">
12182                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
12183                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12184                         <field name="date_applied" reporter:datatype="timestamp"/>
12185                         <field name="org" reporter:datatype="org_unit"/>
12186                         <field name="original_value" reporter:datatype="text"/>
12187                         <field name="new_value" reporter:datatype="text"/>
12188                         <field name="field_name" reporter:datatype="link"/>
12189                 </fields>
12190                 <links>
12191                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
12192                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
12193                 </links>
12194                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12195                         <actions>
12196                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
12197                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
12198                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12199                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12200                         </actions>
12201                 </permacrud>
12202         </class>
12203         <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">
12204                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12205                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12206                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12207                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12208                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12209                 </fields>
12210                 <links>
12211                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12212                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
12213                 </links>
12214         </class>
12215         <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">
12216                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12217                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12218                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12219                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12220                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12221                 </fields>
12222                 <links>
12223                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12224                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
12225                 </links>
12226         </class>
12227         <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">
12228                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
12229                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
12230                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
12231                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
12232                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
12233                 </fields>
12234                 <links>
12235                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
12236                 </links>
12237                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12238                         <actions>
12239                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12240                                 <retrieve/>
12241                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12242                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12243                         </actions>
12244                 </permacrud>
12245         </class>
12246         <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">
12247                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
12248                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12249                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
12250                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
12251                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
12252                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
12253                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
12254                 </fields>
12255                 <links>
12256                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
12257                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
12258                 </links>
12259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12260                         <actions>
12261                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12262                                 <retrieve/>
12263                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12264                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12265                         </actions>
12266                 </permacrud>
12267         </class>
12268         <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">
12269                 <fields oils_persist:primary="code">
12270                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
12271                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
12272                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12273                 </fields>
12274                 <links>
12275                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12276                 </links>
12277                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12278                         <actions>
12279                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12280                                 <retrieve/>
12281                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12282                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12283                         </actions>
12284                 </permacrud>
12285         </class>
12286         <class id="acpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_tag" oils_persist:tablename="asset.copy_tag" reporter:label="Copy Tags" oils_persist:field_safe="true">
12287                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
12288                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12289                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
12290                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12291                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12292                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
12293                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
12294                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12295                 </fields>
12296                 <links>
12297                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
12298                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12299                 </links>
12300                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12301                         <actions>
12302                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
12303                                 <retrieve/>
12304                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
12305                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
12306                         </actions>
12307                 </permacrud>
12308         </class>
12309         <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">
12310                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
12311                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12312                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
12313                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
12314                 </fields>
12315                 <links>
12316                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12317                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
12318                 </links>
12319                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12320                         <actions>
12321                                 <create permission="UPDATE_COPY">
12322                     <context link="copy" field="circ_lib"/>
12323                 </create>
12324                                 <retrieve/>
12325                                 <update permission="UPDATE_COPY">
12326                     <context link="copy" field="circ_lib"/>
12327                 </update>
12328                                 <delete permission="UPDATE_COPY">
12329                     <context link="copy" field="circ_lib"/>
12330                 </delete>
12331                         </actions>
12332                 </permacrud>
12333         </class>
12334         <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">
12335         <oils_persist:source_definition>
12336         SELECT ahcm.target_copy AS id,count(*) AS count
12337          FROM
12338          action.hold_request ahr,
12339          action.hold_copy_map ahcm
12340          WHERE
12341          ahr.cancel_time IS NULL AND
12342          ahr.fulfillment_time IS NULL AND
12343          ahr.capture_time IS NULL AND
12344          ahr.id = ahcm.hold
12345          GROUP BY ahcm.target_copy
12346         </oils_persist:source_definition>
12347         <fields oils_persist:primary="id">
12348             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12349             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
12350         </fields>
12351         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12352             <actions>
12353                <retrieve/>
12354             </actions>
12355         </permacrud>
12356         </class>
12357
12358         <!-- ********************************************************************************************************************* -->
12359
12360 </IDL>
12361
12362 <!--
12363     vim:noet:ts=4:sw=4:
12364 -->