]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1777675 Tweak IDL label for copy inventory
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                 </fields>
98                 <links>
99                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
100                 </links>
101         </class>
102
103         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
104                 <fields>
105                         <field name="id" oils_persist:virtual="true" />
106                         <field name="children" oils_persist:virtual="true" />
107                         <field name="owner_doc" oils_persist:virtual="true" />
108                         <field name="intra_doc_id" oils_persist:virtual="true" />
109                         <field name="parent_node" oils_persist:virtual="true" />
110                         <field name="node_type" oils_persist:virtual="true" />
111                         <field name="namespace_uri" oils_persist:virtual="true" />
112                         <field name="name" oils_persist:virtual="true" />
113                         <field name="value" oils_persist:virtual="true" />
114                 </fields>
115         </class>
116
117         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
118                 <fields>
119                         <field name="title" oils_persist:virtual="true" />
120                         <field name="author" oils_persist:virtual="true" />
121                         <field name="doc_id" oils_persist:virtual="true" />
122                         <field name="doc_type" oils_persist:virtual="true" />
123                         <field name="pubdate" oils_persist:virtual="true" />
124                         <field name="isbn" oils_persist:virtual="true" />
125                         <field name="publisher" oils_persist:virtual="true" />
126                         <field name="tcn" oils_persist:virtual="true" />
127                         <field name="subject" oils_persist:virtual="true" />
128                         <field name="types_of_resource" oils_persist:virtual="true" />
129                         <field name="call_numbers" oils_persist:virtual="true" />
130                         <field name="edition" oils_persist:virtual="true" />
131                         <field name="online_loc" oils_persist:virtual="true" />
132                         <field name="synopsis" oils_persist:virtual="true" />
133                         <field name="physical_description" oils_persist:virtual="true" />
134                         <field name="toc" oils_persist:virtual="true" />
135                         <field name="copy_count" oils_persist:virtual="true" />
136                         <field name="series" oils_persist:virtual="true" />
137                         <field name="serials" oils_persist:virtual="true" />
138                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
139                 </fields>
140         </class>
141
142         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
143                 <fields>
144                         <field name="err_msg" oils_persist:virtual="true" />
145                         <field name="type" oils_persist:virtual="true" />
146                 </fields>
147         </class>
148
149         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
150                 <fields>
151                         <field name="err_msg" oils_persist:virtual="true" />
152                         <field name="type" oils_persist:virtual="true" />
153                 </fields>
154         </class>
155
156         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
157                 <fields oils_persist:primary="matchpoint">
158                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
159                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
160                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
164                 </links>
165         </class>
166
167         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
168         <!-- when the time is right, turn me into a view.  -->
169                 <fields>
170             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
171             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
172             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
173             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
174             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
175             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
176             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
179             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
180                 </fields>
181         </class>
182
183         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
184                 <fields>
185                         <field name="public_name" oils_persist:virtual="true" />
186                         <field name="target_url" oils_persist:virtual="true" />
187                         <field name="target_coverage" oils_persist:virtual="true" />
188                         <field name="target_embargo" oils_persist:virtual="true" />
189                 </fields>
190         </class>
191
192         <!-- Actually in the DB -->
193         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
194                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
195                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
196                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
197                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
198                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
199                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
200                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
201                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
202                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
203                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
204                 </fields>
205                 <links>
206                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
207                 </links>
208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
209                         <actions>
210                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
211                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
212                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
213                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
214                         </actions>
215                 </permacrud>
216         </class>
217
218         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
219                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
220                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
221                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
222                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
223                 </fields>
224                 <links>
225                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
226                 </links>
227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
228                         <actions>
229                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
230                     <context link="grp" field="owner"/>
231                 </create>
232                                 <retrieve/>
233                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
234                     <context link="grp" field="owner"/>
235                 </update>
236                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
237                     <context link="grp" field="owner"/>
238                 </delete>
239                         </actions>
240                 </permacrud>
241         </class>
242
243         <class  id="rrbs" 
244             controller="open-ils.cstore open-ils.pcrud" 
245             oils_obj:fieldmapper="rating::record_badge_score" 
246             oils_persist:tablename="rating.record_badge_score" 
247             reporter:label="Statistical Popularity Badge">
248                 <fields oils_persist:primary="id" 
249                 oils_persist:sequence="rating.record_badge_score_id_seq">
250                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
251                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
252                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
253                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
254                 </fields>
255         <links>
256             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
257             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
258         </links>
259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
260                         <actions>
261                                 <retrieve/>
262                         </actions>
263                 </permacrud>
264         </class>
265
266         <class  id="rp" 
267             controller="open-ils.cstore open-ils.pcrud" 
268             oils_obj:fieldmapper="rating::popularity_parameter" 
269             oils_persist:tablename="rating.popularity_parameter" 
270             reporter:label="Statistical Popularity Parameter">
271                 <fields oils_persist:primary="id" 
272                 oils_persist:sequence="rating.popularity_parameter_id_seq">
273                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
274                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
275                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
276                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
277                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
278                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
279                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
280                 </fields>
281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
282                         <actions>
283                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
284                                 <retrieve/>
285                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
286                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
287                         </actions>
288                 </permacrud>
289         </class>
290
291         <class  id="rb" 
292             controller="open-ils.cstore open-ils.pcrud" 
293             oils_obj:fieldmapper="rating::badge" 
294             oils_persist:tablename="rating.badge" 
295             reporter:label="Statistical Popularity Badge">
296                 <fields oils_persist:primary="id" 
297                 oils_persist:sequence="rating.badge_id_seq">
298                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
299                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
301                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
302                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
303                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
304                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
305                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
306                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
307                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
308                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
309                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
310                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
311                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
312                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
313                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
314                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
315                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
316                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
317                 </fields>
318                 <links>
319                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
320                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
321                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
322                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
323                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
324                 </links>
325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
326                         <actions>
327                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
328                                 <retrieve/>
329                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
330                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
331                         </actions>
332                 </permacrud>
333         </class>
334
335         <class  id="vibtg" 
336             controller="open-ils.cstore open-ils.pcrud" 
337             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
338             oils_persist:tablename="vandelay.import_bib_trash_group" 
339             reporter:label="Import/Overlay Field Groups for Removal">
340                 <fields oils_persist:primary="id" 
341                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
342                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
343                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
344                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
345                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
346                 </fields>
347                 <links>
348                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
349                 </links>
350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
351                         <actions>
352                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
353                                 <retrieve/>
354                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
355                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                         </actions>
357                 </permacrud>
358         </class>
359
360
361         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
362                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
363                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
364                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
365                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
366                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
367                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
368                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
369                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
370                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
371                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
372                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
373                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
374                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
375                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
376                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
377                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
378                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
379                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
380                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
381                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
382                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
383                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
384                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
385                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
386                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
387                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
388                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
389                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
390                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
391                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
392                 </fields>
393                 <links>
394                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
395                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
396                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <create permission="CREATE_IMPORT_ITEM">
402                     <context link="definition" field="owner"/>
403                                 </create>
404                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
405                     <context link="definition" field="owner"/>
406                                 </retrieve>
407                                 <update permission="UPDATE_IMPORT_ITEM">
408                     <context link="definition" field="owner"/>
409                                 </update>
410                                 <delete permission="DELETE_IMPORT_ITEM">
411                     <context link="definition" field="owner"/>
412                                 </delete>
413                         </actions>
414                 </permacrud>
415         </class>
416
417         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
418                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
419                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
420                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
421                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
422                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
423                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
424                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
425                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
426                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
427                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
428                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
429                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
430                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
431                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
432                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
433                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
434                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
435                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
436                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
437                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
438                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
439                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
440                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
441                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
442                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
443                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
444                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
445                 </fields>
446                 <links>
447                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
448                 </links>
449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
450                         <actions>
451                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
452                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
453                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
454                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                         </actions>
456                 </permacrud>
457         </class>
458
459         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
460                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
461                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
462                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
463                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
464                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
465                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
466                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
467                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
468                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
469                 </fields>
470                 <links>
471                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
472                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
473                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
474                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
475                 </links>
476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
477                         <actions>
478                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
479                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
480                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
481                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
482                         </actions>
483                 </permacrud>
484         </class>
485
486         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
487                 <fields oils_persist:primary="code">
488                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
489                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
490                 </fields>
491                 <links>
492                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
493                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
494                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
495                 </links>
496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
497                         <actions>
498                                 <retrieve/>
499                         </actions>
500                 </permacrud>
501         </class>
502
503         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
504                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
505                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
506                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
507                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
508                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
509                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
510                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
511                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
512                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
513                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
514                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
515                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
516                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
517                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
518                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
519                 </fields>
520                 <links>
521                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
522                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
523                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
524                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
525             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
526             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
527             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
528                 </links>
529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
530                         <actions>
531                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
532                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
533                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
534                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
535                         </actions>
536                 </permacrud>
537         </class>
538
539         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
540                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
541                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
542                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
543                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
544                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
545                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
546                 </fields>
547                 <links/>
548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
549                         <actions>
550                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
551                 <retrieve/>
552                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
553                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
554                         </actions>
555                 </permacrud>
556         </class>
557
558         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
559                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
560                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
561                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
562                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
563                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
564                 </fields>
565                 <links>
566                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
567                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
568                 </links>
569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
570                         <actions>
571                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
572                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
573                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
574                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
575                         </actions>
576                 </permacrud>
577         </class>
578
579         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
580                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
581                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
582                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
583                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
584                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
585                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
586                 </fields>
587                 <links>
588                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
589                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
590                 </links>
591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
592                         <actions>
593                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
594                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
595                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
596                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
597                         </actions>
598                 </permacrud>
599         </class>
600
601         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
602                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
603                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
604                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
605                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
606                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
607                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
608                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
609                 </fields>
610                 <links>
611                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
612                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
613                 </links>
614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
615                         <actions>
616                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                         </actions>
621                 </permacrud>
622         </class>
623
624         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
625                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
626                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
627                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
628                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
629                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
630                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
631                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
632                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
633                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
634                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
635                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
636                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
637                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
638                 </fields>
639                 <links>
640                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
641                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
642                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
643             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
644             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
645                 </links>
646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
647                         <actions>
648                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
649                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
650                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
651                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                         </actions>
653                 </permacrud>
654         </class>
655
656         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
657                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
658                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
659                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
660                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
661                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
662                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
663                 </fields>
664                 <links/>
665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
666                         <actions>
667                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
668                 <retrieve/>
669                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
670                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                         </actions>
672                 </permacrud>
673         </class>
674
675         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
676                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
677                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
678                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
679                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
680                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
681                 </fields>
682                 <links>
683                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
684                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
685                 </links>
686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687                         <actions>
688                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
689                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
690                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
691                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                         </actions>
693                 </permacrud>
694         </class>
695
696         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
697                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
698                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
699                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
700                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
701                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
702                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
703                 </fields>
704                 <links>
705                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
706                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
707                 </links>
708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
709                         <actions>
710                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
711                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
712                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
713                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                         </actions>
715                 </permacrud>
716         </class>
717
718         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
719                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
720                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
721                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
722                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
723                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
724                 </fields>
725                 <links>
726                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
727                 </links>
728                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
729                         <actions>
730                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
731                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
732                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
733                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                         </actions>
735                 </permacrud>
736         </class>
737
738         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
739                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
740                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
741                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
742                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
743                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
744                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
745                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
746                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
747             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
748                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
749                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
750                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
751                 </fields>
752                 <links>
753                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
754                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
755                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
756                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
757                 </links>
758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
759                         <actions>
760                                 <create permission="ADMIN_IMPORT_MATCH_SET">
761                     <context link="match_set" field="owner"/>
762                                 </create>
763                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
764                     <context link="match_set" field="owner"/>
765                                 </retrieve>
766                                 <update permission="ADMIN_IMPORT_MATCH_SET">
767                     <context link="match_set" field="owner"/>
768                                 </update>
769                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
770                     <context link="match_set" field="owner"/>
771                                 </delete>
772                         </actions>
773                 </permacrud>
774         </class>
775
776         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
777                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
778                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
779                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
780                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
781                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
782                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
783                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
784                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
785                 </fields>
786                 <links>
787                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
788                 </links>
789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
790                         <actions>
791                                 <create permission="ADMIN_IMPORT_MATCH_SET">
792                     <context link="match_set" field="owner"/>
793                                 </create>
794                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
795                     <context link="match_set" field="owner"/>
796                                 </retrieve>
797                                 <update permission="ADMIN_IMPORT_MATCH_SET">
798                     <context link="match_set" field="owner"/>
799                                 </update>
800                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
801                     <context link="match_set" field="owner"/>
802                                 </delete>
803                         </actions>
804                 </permacrud>
805         </class>
806
807         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
808                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
809                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
810                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
811                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
812                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
813                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
814                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
815                 </fields>
816                 <links>
817                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
818                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
819                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
820                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
821                 </links>
822         </class>
823
824     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
825         <fields oils_persist:primary="name">
826             <field reporter:label="Name" name="name" reporter:datatype="text"/>
827             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
828             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
829             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
830         </fields>
831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
832             <actions>
833                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
834                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
835                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
836                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
837             </actions>
838         </permacrud>
839     </class>
840
841     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
842         <fields oils_persist:primary="id">
843             <field reporter:label="ID" name="id" reporter:datatype="id"/>
844             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
845             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
846             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
847             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
848         </fields>
849         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
850             <actions>
851                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
852                 <retrieve/>
853                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
854                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
855             </actions>
856         </permacrud>
857     </class>
858
859         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
860                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
861                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
862                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
863                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
864                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
865                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
866                 </fields>
867                 <links>
868                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
869                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
870                 </links>
871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
872             <actions>
873                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
874                 <retrieve/>
875                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
876                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
877             </actions>
878         </permacrud>
879         </class>
880
881         <class id="cmrcfmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_format" oils_persist:tablename="config.marc_format" reporter:label="MARC Formats" oils_persist:field_safe="true">
882                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
883                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
884                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
885                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
886         </fields>
887         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
888             <actions>
889                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
890                 <retrieve/>
891                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
892                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
893             </actions>
894         </permacrud>
895         </class>
896
897         <class id="cmrcfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_field" oils_persist:tablename="config.marc_field" reporter:label="MARC Fields" oils_persist:field_safe="true">
898                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
899                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
900                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
901                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
902                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
903                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
904                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
905                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
906                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
907                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
908                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
909                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
910         </fields>
911                 <links>
912                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
913                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
914         </links>
915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
916             <actions>
917                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
918                 <retrieve/>
919                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
920                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
921             </actions>
922         </permacrud>
923         </class>
924
925         <class id="cmrcsubfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_subfield" oils_persist:tablename="config.marc_subfield" reporter:label="MARC Subfields" oils_persist:subfield_safe="true">
926                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
927                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
928                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
929                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
930                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
931                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
932                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
933                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
934                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
935                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
936                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
937         </fields>
938                 <links>
939                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
940                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
941         </links>
942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
943             <actions>
944                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
945                 <retrieve/>
946                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
947                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
948             </actions>
949         </permacrud>
950         </class>
951
952         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
953                 <fields oils_persist:primary="name">
954                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
955                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
956                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
957                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
958                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
959                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
960                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
961                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
962                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
963                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
964                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
965                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
966                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
967                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
968                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
969                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
970                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
971                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
972                 </fields>
973                 <links>
974                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
975                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
976                 </links>
977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
978             <actions>
979                 <create permission="ADMIN_SVF" global_required="true"/>
980                 <retrieve/>
981                 <update permission="ADMIN_SVF" global_required="true"/>
982                 <delete permission="ADMIN_SVF" global_required="true"/>
983             </actions>
984         </permacrud>
985         </class>
986
987         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
988                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
989                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
990                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
991                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
992             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
993                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
994                 </fields>
995                 <links/>
996         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
997             <actions>
998                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
999                 <retrieve/>
1000                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1001                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1002             </actions>
1003         </permacrud>
1004         </class>
1005
1006         <class id="ccraed" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::composite_attr_entry_definition" oils_persist:tablename="config.composite_attr_entry_definition" reporter:label="Composite Attribute Definitions" oils_persist:field_safe="true">
1007                 <fields oils_persist:primary="coded_value">
1008                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1009                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1010                 </fields>
1011                 <links>
1012                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1013                 </links>
1014         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1015             <actions>
1016                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1017                 <retrieve/>
1018                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1019                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1020             </actions>
1021         </permacrud>
1022         </class>
1023
1024         <class id="murav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::uncontrolled_record_attr_value" oils_persist:tablename="metabib.uncontrolled_record_attr_value" reporter:label="Uncontrolled Record Attribute Values" oils_persist:field_safe="true">
1025                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1026                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1027                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1028                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1029                 </fields>
1030                 <links>
1031                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1032                 </links>
1033         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1034             <actions>
1035                 <retrieve/>
1036             </actions>
1037         </permacrud>
1038         </class>
1039
1040
1041         <class id="mrs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_sorter" oils_persist:tablename="metabib.record_sorter" reporter:label="Record Sort Values" oils_persist:field_safe="true">
1042                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1043                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1044                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1045                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1046                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1047                 </fields>
1048                 <links>
1049                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1050                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1051                 </links>
1052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1053             <actions>
1054                 <retrieve/>
1055             </actions>
1056         </permacrud>
1057         </class>
1058
1059
1060         <class id="mravl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_vector_list" oils_persist:tablename="metabib.record_attr_vector_list" reporter:label="MVF Record Attribute Vectors" oils_persist:field_safe="true">
1061                 <fields oils_persist:primary="source">
1062                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1063                         <field reporter:label="Vector" name="vlist" reporter:datatype="text"  oils_obj:required="true"/> <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
1064                 </fields>
1065                 <links>
1066                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1067                 </links>
1068         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1069             <actions>
1070                 <retrieve/>
1071             </actions>
1072         </permacrud>
1073         </class>
1074
1075         <class id="mraf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_flat" oils_persist:tablename="metabib.record_attr_flat" reporter:label="MVF Record Attribute Flat List" oils_persist:field_safe="true">
1076                 <fields>
1077                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1078                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1079                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1080                 </fields>
1081                 <links>
1082                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1083                 </links>
1084         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1085             <actions>
1086                 <retrieve/>
1087             </actions>
1088         </permacrud>
1089         </class>
1090
1091         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true" oils_persist:readonly="true">
1092                 <fields oils_persist:primary="id">
1093                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1094                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1095                 </fields>
1096                 <links>
1097                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1098                 </links>
1099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1100             <actions>
1101                 <retrieve/>
1102             </actions>
1103         </permacrud>
1104         </class>
1105
1106         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
1107                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1108                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1109                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1110                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1111                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1112                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1113                 </fields>
1114                 <links>
1115                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1116                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1117                 </links>
1118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1119             <actions>
1120                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1121                 <retrieve/>
1122                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1123                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1124             </actions>
1125         </permacrud>
1126         </class>
1127
1128         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
1129                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1130                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1131                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1132                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1133                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1134                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1135                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1136                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1137             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1138             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1139             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1140                 </fields>
1141                 <links>
1142                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1143                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1144                 </links>
1145         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1146             <actions>
1147                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1148                 <retrieve/>
1149                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1150                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1151             </actions>
1152         </permacrud>
1153         </class>
1154
1155         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
1156                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1157                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1158                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1159                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1160                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1161                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1162                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1163                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1164                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1165                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1166                 </fields>
1167                 <links>
1168                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1169                 </links>
1170         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1171             <actions>
1172                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1173                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1174                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1175                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1176             </actions>
1177         </permacrud>
1178         </class>
1179
1180     <class id="czs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_source" oils_persist:tablename="config.z3950_source" reporter:label="Z39.50 Source">
1181         <fields oils_persist:primary="name">
1182             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1183             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1184             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1185             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1186             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1187             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1188             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1189             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1190             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1191             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1192         </fields>
1193         <links>
1194             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1195             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1196         </links>
1197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1198             <actions>
1199                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1200                 <retrieve/>
1201                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1202                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1203             </actions>
1204         </permacrud>
1205     </class>
1206
1207     <class id="cza" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
1208         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1209             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1210             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1211             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1212             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1213             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1214             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1215             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1216         </fields>
1217         <links>
1218             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1219         </links>
1220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1221             <actions>
1222                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1223                 <retrieve/>
1224                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1225                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1226             </actions>
1227         </permacrud>
1228     </class>
1229
1230     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1231                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1232                         oils_persist:tablename="config.z3950_index_field_map" 
1233                         reporter:label="Z39.50 Index Field Map">
1234         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1235             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1236             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1237             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1238             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1239             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1240             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1241         </fields>
1242         <links>
1243             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1244             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1245             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1246         </links>
1247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1248             <actions>
1249                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1250                 <retrieve/>
1251                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1252                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1253             </actions>
1254         </permacrud>
1255     </class>
1256
1257
1258         <class id="ateo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_output" oils_persist:tablename="action_trigger.event_output" reporter:label="Event Output">
1259                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1260                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1261                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1262                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1263                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1264                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1265                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1266                 </fields>
1267                 <links>
1268             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1269             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1270                 </links>
1271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1272                         <actions>
1273                                 <retrieve/>
1274                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1275                         </actions>
1276                 </permacrud>
1277         </class>
1278
1279         <class id="ath" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::hook" oils_persist:tablename="action_trigger.hook" reporter:label="Trigger Hook Point">
1280                 <fields oils_persist:primary="key">
1281                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1282                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1283                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1284                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1285                 </fields>
1286                 <links/>
1287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1288                         <actions>
1289                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1290                                 <retrieve/>
1291                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1292                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1293                         </actions>
1294                 </permacrud>
1295         </class>
1296
1297         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1298                 <fields oils_persist:primary="module">
1299                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1301                 </fields>
1302                 <links/>
1303         </class>
1304
1305         <class id="atval" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::validator" oils_persist:tablename="action_trigger.validator" reporter:label="Trigger Condition Validator">
1306                 <fields oils_persist:primary="module">
1307                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1308                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1309                 </fields>
1310                 <links/>
1311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1312                         <actions>
1313                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1314                                 <retrieve/>
1315                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1316                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1317                         </actions>
1318                 </permacrud>
1319         </class>
1320
1321         <class id="atreact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::reactor" oils_persist:tablename="action_trigger.reactor" reporter:label="Trigger Event Reactor">
1322                 <fields oils_persist:primary="module">
1323                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1324                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1325                 </fields>
1326                 <links/>
1327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1328                         <actions>
1329                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1330                                 <retrieve/>
1331                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1332                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1333                         </actions>
1334                 </permacrud>
1335         </class>
1336
1337         <class id="atclean" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::cleanup" oils_persist:tablename="action_trigger.cleanup" reporter:label="Trigger Event Cleanup">
1338                 <fields oils_persist:primary="module">
1339                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1340                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1341                 </fields>
1342                 <links/>
1343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1344                         <actions>
1345                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1346                                 <retrieve/>
1347                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1348                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1349                         </actions>
1350                 </permacrud>
1351         </class>
1352
1353         <class id="atenv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::environment" oils_persist:tablename="action_trigger.environment" reporter:label="Trigger Event Environment Entry">
1354                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1355                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1356                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1357                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1358                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1359                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1360                 </fields>
1361                 <links>
1362                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1363                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1364                 </links>
1365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1366                         <actions>
1367                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1368                     <context link="event_def" field="owner"/>
1369                 </create>
1370                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1371                     <context link="event_def" field="owner"/>
1372                 </retrieve>
1373                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1374                     <context link="event_def" field="owner"/>
1375                 </update>
1376                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1377                     <context link="event_def" field="owner"/>
1378                 </delete>
1379                         </actions>
1380                 </permacrud>
1381         </class>
1382
1383         <class id="atevdef" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_definition" oils_persist:tablename="action_trigger.event_definition" reporter:label="Trigger Event Definition">
1384                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1385                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1386                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1387                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1388                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1389                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1390                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1391                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1392                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1393                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1394                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1395                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1396                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1397                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1398                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1399                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1400                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1401                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1402                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1403                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1404                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1405                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1406                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1407                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1408                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1409                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1410                 </fields>
1411                 <links>
1412                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1413                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1414                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1415                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1416                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1417                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1418                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1419                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1420                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1421                 </links>
1422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1423                         <actions>
1424                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1425                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1426                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1427                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1428                         </actions>
1429                 </permacrud>
1430         </class>
1431
1432         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1433                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1434                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1435                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1436                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1437                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1438                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1439                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1440                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1441                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1442                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1443                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1444                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1445                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1446                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1447                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1448                 </fields>
1449                 <links>
1450                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1451                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1452                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1453                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1454                 </links>
1455         </class>
1456
1457         <class id="atevparam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_param" oils_persist:tablename="action_trigger.event_params" reporter:label="Trigger Event Parameter">
1458                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1459                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1460                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1461                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1462                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1463                 </fields>
1464                 <links>
1465                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1466                 </links>
1467                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1468                         <actions>
1469                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1470                     <context link="event_def" field="owner"/>
1471                 </create>
1472                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1473                     <context link="event_def" field="owner"/>
1474                 </retrieve>
1475                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1476                     <context link="event_def" field="owner"/>
1477                 </update>
1478                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1479                     <context link="event_def" field="owner"/>
1480                 </delete>
1481                         </actions>
1482                 </permacrud>
1483         </class>
1484
1485         <class id="atul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::user_log" reporter:label="Action Trigger User Log" oils_persist:readonly="true">
1486                 <oils_persist:source_definition><![CDATA[
1487                 SELECT  atevdef.hook,
1488                         atevdef.name,
1489                         atevdef.reactor,
1490                         atev.id,
1491                         atev.event_def,
1492                         atev.add_time,
1493                         atev.run_time,
1494                         atev.start_time,
1495                         atev.update_time,
1496                         atev.complete_time,
1497                         atev.update_process,
1498                         atev.state,
1499                         atev.user_data,
1500                         atev.template_output,
1501                         atev.error_output,
1502                         atev.async_output,
1503                         targ_circ.id AS target_circ,
1504                         targ_ahr.id AS target_hold,
1505                         COALESCE(
1506                                 targ_circ.circ_lib,
1507                                 targ_ahr.pickup_lib
1508                         ) AS perm_lib
1509                 FROM action_trigger.event atev
1510                 JOIN action_trigger.event_definition atevdef ON
1511                         (atevdef.id = atev.event_def)
1512                 JOIN action_trigger.hook ath ON
1513                         (ath.key = atevdef.hook)
1514                 LEFT JOIN action.circulation targ_circ ON
1515                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1516                 LEFT JOIN action.hold_request targ_ahr ON
1517                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1518                 WHERE atev.add_time > NOW() - (SELECT MIN(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="aecc"
3279             controller="open-ils.cstore open-ils.pcrud"
3280             oils_obj:fieldmapper="action::emergency_closing_circulation"
3281             oils_persist:tablename="action.emergency_closing_circulation"
3282             reporter:label="Emergency Closing Circulation Entry"
3283             oils_persist:readonly="true"
3284     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3285         <fields oils_persist:primary="id">
3286             <field name="id" reporter:datatype="id" />
3287             <field name="circulation" reporter:datatype="link" />
3288                         <field name="emergency_closing" reporter:datatype="link"/>
3289             <field name="original_due_date" reporter:datatype="timestamp" />
3290             <field name="process_time" reporter:datatype="timestamp" />
3291         </fields>
3292         <links>
3293             <link field="circulation" reltype="has_a" key="id" map="" class="circ"/>
3294             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3295         </links>
3296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3297             <actions>
3298                 <retrieve/>
3299             </actions>
3300         </permacrud>
3301     </class>
3302     <class  id="aecr"
3303             controller="open-ils.cstore open-ils.pcrud"
3304             oils_obj:fieldmapper="action::emergency_closing_reservation"
3305             oils_persist:tablename="action.emergency_closing_reservation"
3306             reporter:label="Emergency Closing Reservation Entry"
3307             oils_persist:readonly="true"
3308     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3309         <fields oils_persist:primary="id">
3310             <field name="id" reporter:datatype="id" />
3311             <field name="reservation" reporter:datatype="link" />
3312                         <field name="emergency_closing" reporter:datatype="link"/>
3313             <field name="original_end_time" reporter:datatype="timestamp" />
3314             <field name="process_time" reporter:datatype="timestamp" />
3315         </fields>
3316         <links>
3317             <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3318             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3319         </links>
3320         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3321             <actions>
3322                 <retrieve/>
3323             </actions>
3324         </permacrud>
3325     </class>
3326     <class  id="aech"
3327             controller="open-ils.cstore open-ils.pcrud"
3328             oils_obj:fieldmapper="action::emergency_closing_hold"
3329             oils_persist:tablename="action.emergency_closing_hold"
3330             reporter:label="Emergency Closing Hold Entry"
3331             oils_persist:readonly="true"
3332     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3333         <fields oils_persist:primary="id">
3334             <field name="id" reporter:datatype="id" />
3335             <field name="hold" reporter:datatype="link" />
3336                         <field name="emergency_closing" reporter:datatype="link"/>
3337             <field name="original_shelf_expire_time" reporter:datatype="timestamp" />
3338             <field name="process_time" reporter:datatype="timestamp" />
3339         </fields>
3340         <links>
3341             <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3342             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3343         </links>
3344         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3345             <actions>
3346                 <retrieve/>
3347             </actions>
3348         </permacrud>
3349     </class>
3350     <class  id="aecs"
3351             controller="open-ils.cstore open-ils.pcrud"
3352             oils_obj:fieldmapper="action::emergency_closing_status"
3353             oils_persist:tablename="action.emergency_closing_status"
3354             reporter:label="Emergency Closing Status"
3355             oils_persist:readonly="true"
3356     >
3357         <fields oils_persist:primary="id">
3358             <field name="id" reporter:datatype="id" />
3359             <field name="creator" reporter:datatype="link" />
3360             <field name="create_time" reporter:datatype="timestamp" />
3361             <field name="process_start_time" reporter:datatype="timestamp" />
3362             <field name="process_end_time" reporter:datatype="timestamp" />
3363             <field name="last_update_time" reporter:datatype="timestamp" />
3364             <field name="circulations" reporter:datatype="int" />
3365             <field name="circulations_complete" reporter:datatype="int" />
3366             <field name="reservations" reporter:datatype="int" />
3367             <field name="reservations_complete" reporter:datatype="int" />
3368             <field name="holds" reporter:datatype="int" />
3369             <field name="holds_complete" reporter:datatype="int" />
3370         </fields>
3371         <links>
3372             <link field="id" reltype="has_a" key="id" map="" class="aec"/>
3373         </links>
3374         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3375             <actions>
3376                 <retrieve/>
3377             </actions>
3378         </permacrud>
3379     </class>
3380     <class id="aec" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::emergency_closing" oils_persist:tablename="action.emergency_closing" reporter:label="Emergency Closing">
3381         <fields oils_persist:primary="id" oils_persist:sequence="action.emergency_closing_id_seq">
3382             <field name="id" reporter:datatype="id" />
3383             <field name="creator" reporter:datatype="link" />
3384             <field name="create_time" reporter:datatype="timestamp" />
3385             <field name="process_start_time" reporter:datatype="timestamp" />
3386             <field name="process_end_time" reporter:datatype="timestamp" />
3387             <field name="last_update_time" reporter:datatype="timestamp" />
3388             <field name="closing" oils_persist:virtual="true" reporter:datatype="link"/>
3389             <field name="status" oils_persist:virtual="true" reporter:datatype="link"/>
3390             <field name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3391             <field name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3392             <field name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3393         </fields>
3394         <links>
3395             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3396             <link field="closing" reltype="might_have" key="emergency_closing" map="" class="aoucd"/>
3397             <link field="status" reltype="might_have" key="id" map="" class="aecs"/>
3398             <link field="circulations" reltype="has_many" key="emergency_closing" map="" class="aecc"/>
3399             <link field="reservations" reltype="has_many" key="emergency_closing" map="" class="aecr"/>
3400             <link field="holds" reltype="has_many" key="emergency_closing" map="" class="aech"/>
3401         </links>
3402         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3403             <actions>
3404                 <create permission="EMERGENCY_CLOSING">
3405                     <context link="closing" field="org_unit" />
3406                 </create>
3407                 <retrieve/>
3408                 <update permission="EMERGENCY_CLOSING">
3409                     <context link="closing" field="org_unit" />
3410                 </update>
3411                 <delete permission="EMERGENCY_CLOSING">
3412                     <context link="closing" field="org_unit" />
3413                 </delete>
3414             </actions>
3415         </permacrud>
3416     </class>
3417         <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">
3418                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3419                         <field name="close_end" reporter:datatype="timestamp" />
3420                         <field name="close_start" reporter:datatype="timestamp" />
3421                         <field name="id" reporter:datatype="id" />
3422                         <field name="org_unit" reporter:datatype="org_unit"/>
3423                         <field name="reason" reporter:datatype="text"/>
3424                         <field name="full_day" reporter:datatype="bool"/>
3425                         <field name="multi_day" reporter:datatype="bool"/>
3426                         <field name="emergency_closing" reporter:datatype="link"/>
3427                 </fields>
3428                 <links>
3429                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3430                         <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3431                 </links>
3432         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3433             <actions>
3434                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3435                 <retrieve/>
3436                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3437                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3438             </actions>
3439         </permacrud>
3440         </class>
3441         <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">
3442                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3443                         <field name="extended" reporter:datatype="interval"/>
3444                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3445                         <field name="max_renewals" reporter:datatype="int" />
3446                         <field name="name" reporter:datatype="text"/>
3447                         <field name="normal" reporter:datatype="interval"/>
3448                         <field name="shrt" reporter:datatype="interval"/>
3449                         <field name="max_auto_renewals" reporter:datatype="int" />
3450                 </fields>
3451                 <links>
3452                 </links>
3453         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3454             <actions>
3455                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3456                 <retrieve/>
3457                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3458                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3459             </actions>
3460         </permacrud>
3461         </class>
3462
3463         <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">
3464                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3465                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3466                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3467             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3468                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3469             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3470                 </fields>
3471                 <links>
3472             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3473                 </links>
3474                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3475             <actions>
3476                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3477                 <retrieve/>
3478                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3479                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3480             </actions>
3481                 </permacrud>
3482         </class>
3483
3484         <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">
3485                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3486                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3487                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3488                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3489             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3490                 </fields>
3491                 <links>
3492                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3493                 </links>
3494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3495             <actions>
3496                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3497                 <retrieve/>
3498                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3499                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3500             </actions>
3501                 </permacrud>
3502         </class>
3503
3504         <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">
3505                 <fields oils_persist:primary="id" oils_persist:sequence="">
3506                         <field name="balance_owed" reporter:datatype="money"/>
3507                         <field name="id" reporter:datatype="id" />
3508                         <field name="last_billing_note" reporter:datatype="text"/>
3509                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3510                         <field name="last_billing_type" reporter:datatype="text"/>
3511                         <field name="last_payment_note" reporter:datatype="text"/>
3512                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3513                         <field name="last_payment_type" reporter:datatype="text"/>
3514                         <field name="total_owed" reporter:datatype="money"/>
3515                         <field name="total_paid" reporter:datatype="money"/>
3516                         <field name="usr" reporter:datatype="link"/>
3517                         <field name="xact_finish" reporter:datatype="timestamp" />
3518                         <field name="xact_start" reporter:datatype="timestamp" />
3519                         <field name="xact_type" reporter:datatype="text"/>
3520                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3521                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3522                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3523                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3524                         <field name="billing_location" reporter:datatype="link"/>
3525                 </fields>
3526                 <links>
3527                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3528                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3529                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3530                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3531                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3532                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3533                 </links>
3534                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3535                         <actions>
3536                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3537                                         <context link="usr" field="home_ou" />
3538                                 </retrieve>
3539                         </actions>
3540                 </permacrud>
3541         </class>
3542         <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">
3543                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3544                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3545                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3546                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3547                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3548                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3549                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3550                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3551                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3552                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3553                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3554                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3555                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3556                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3557                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3558                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3559                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3560                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3561                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3562                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3563                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3564                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3565                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3566                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3567                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3568                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3569                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3570                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3571                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3572                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3573                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3574                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3575                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3576                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3577                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3578                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3579                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3580                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3581                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3582                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3583                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3584                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3585                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3586                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3587                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3588                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3589                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3590                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3591                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3592                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3593                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3594                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3595                         <field reporter:label="Preferred Prefix" name="pref_prefix" reporter:datatype="text"/>
3596                         <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
3597                         <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
3598                         <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
3599                         <field reporter:label="Preferred Suffix" name="pref_suffix" reporter:datatype="text"/>
3600                         <field reporter:label="Name Keywords" name="name_keywords" reporter:datatype="text"/>
3601                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3602                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3603                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3604                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3605                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3606                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3607                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3608                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3609                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3610                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3611                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3612                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3613                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3614                 </fields>
3615                 <links>
3616                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3617                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3618                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3619                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3620                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3621                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3622                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3623                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3624                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3625                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3626                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3627                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3628                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3629                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3630                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3631                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3632                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3633                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3634                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3635                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3636                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3637                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3638                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3639                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3640                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3641                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3642                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3643                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3644                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3645                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3646                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3647                 </links>
3648                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3649                         <actions>
3650                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3651                         </actions>
3652                 </permacrud>
3653         </class>
3654         <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">
3655                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3656                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3657                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3658                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3659                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3660                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3661                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3662                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3663                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3664         </fields>
3665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3666                         <actions>
3667                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3668                                 <retrieve/>
3669                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3670                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3671                         </actions>
3672                 </permacrud>
3673         </class>
3674         <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">
3675                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3676                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3677                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3678                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3679                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3680         </fields>
3681         <links>
3682                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3683                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3684                 </links>
3685                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3686                         <actions>
3687                                 <retrieve permission="RUN_REPORTS">
3688                                         <context link="usr" field="home_ou" />
3689                                 </retrieve>
3690                         </actions>
3691                 </permacrud>
3692         </class>
3693         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3694                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3695                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3696                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3697                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3698                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3699                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3700                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3701         </fields>
3702         <links>
3703                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3704                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3705                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3706                 </links>
3707                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3708                         <actions>
3709                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3710                                         <context link="usr" field="home_ou" />
3711                                         <context link="ws" field="owning_lib" />
3712                                 </retrieve>
3713                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3714                                         <context link="usr" field="home_ou" />
3715                                         <context link="ws" field="owning_lib" />
3716                                 </create>
3717                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3718                                         <context link="usr" field="home_ou" />
3719                                         <context link="ws" field="owning_lib" />
3720                                 </update>
3721                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3722                                         <context link="usr" field="home_ou" />
3723                                         <context link="ws" field="owning_lib" />
3724                                 </delete>
3725                         </actions>
3726                 </permacrud>
3727         </class>
3728         <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">
3729                 <fields oils_persist:primary="name">
3730                         <field name="name" reporter:datatype="text"/>
3731                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3732                 </fields>
3733                 <links/>
3734                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3735                         <actions>
3736                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3737                                 <retrieve/>
3738                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3739                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3740                         </actions>
3741                 </permacrud>
3742         </class>
3743         <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">
3744                 <fields oils_persist:primary="name">
3745                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3746                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3747                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3748                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3749                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3750                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3751                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3752                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3753                 </fields>
3754                 <links>
3755                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3756                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3757                 </links>
3758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3759                         <actions>
3760                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3761                                 <retrieve/>
3762                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3763                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3764                         </actions>
3765                 </permacrud>
3766         </class>
3767         <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">
3768                 <fields oils_persist:primary="name">
3769                         <field name="name" reporter:datatype="text"/>
3770                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3771                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3772                         <field name="datatype" reporter:datatype="text"/>
3773                         <field name="view_perm" reporter:datatype="link"/>
3774                         <field name="update_perm" reporter:datatype="link"/>
3775                         <field name="fm_class" reporter:datatype="text"/>
3776                         <field name="grp" reporter:datatype="link"/>
3777                 </fields>
3778                 <links>
3779                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3780                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3781                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3782                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3783                 </links>
3784                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3785                         <actions>
3786                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3787                                 <retrieve/>
3788                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3789                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3790                         </actions>
3791                 </permacrud>
3792         </class>
3793         <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">
3794                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3795                         <field name="id" />
3796                         <field name="name"  reporter:datatype="text"/>
3797                         <field name="org_unit" reporter:datatype="org_unit"/>
3798                         <field name="value"  reporter:datatype="text"/>
3799                 </fields>
3800                 <links>
3801                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3802                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3803                 </links>
3804         </class>
3805         <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">
3806                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3807                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3808                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3809                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3810                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3811                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3812                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3813                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3814                 </fields>
3815                 <links>
3816                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3817                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3818                 </links>
3819         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3820             <actions>
3821                 <create permission="CREATE_COPY_NOTE">
3822                     <context link="owning_copy" field="circ_lib"/>
3823                 </create>
3824                 <retrieve permission="VIEW_COPY_NOTES">
3825                     <context link="owning_copy" field="circ_lib"/>
3826                 </retrieve>
3827                 <update permission="UPDATE_COPY_NOTE">
3828                     <context link="owning_copy" field="circ_lib"/>
3829                 </update>
3830                 <delete permission="DELETE_COPY_NOTE">
3831                     <context link="owning_copy" field="circ_lib"/>
3832                 </delete>
3833             </actions>
3834         </permacrud>
3835         </class>
3836         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3837                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3838                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3839                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3840                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3841                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3842                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3843                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3844                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3845                 </fields>
3846                 <links>
3847                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3848                 </links>
3849         </class>
3850         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3851                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3852                         <field name="fingerprint"  reporter:datatype="text"/>
3853                         <field name="id" reporter:datatype="id" />
3854                         <field name="master_record" reporter:datatype="link"/>
3855                         <field name="mods"  reporter:datatype="text"/>
3856                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3857                 </fields>
3858                 <links>
3859                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3860                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3861                 </links>
3862         </class>
3863         <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">
3864                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3865                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3866                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3867                 </fields>
3868                 <links/>
3869         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3870             <actions>
3871                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3872                 <retrieve/>
3873                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3874                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3875             </actions>
3876         </permacrud>
3877         </class>
3878         <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">
3879                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3880                         <field name="code"  reporter:datatype="text"/>
3881                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3882                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3883                 </fields>
3884                 <links/>
3885         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3886             <actions>
3887                 <create permission="CREATE_PERM" global_required="true"/>
3888                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3889                 <update permission="UPDATE_PERM" global_required="true"/>
3890                 <delete permission="DELETE_PERM" global_required="true"/>
3891             </actions>
3892         </permacrud>
3893         </class>
3894         <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">
3895                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3896                         <field name="id" reporter:datatype="id" />
3897                         <field name="metarecord" reporter:datatype="link"/>
3898                         <field name="source" reporter:datatype="link"/>
3899                 </fields>
3900                 <links>
3901                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3902                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3903                 </links>
3904         </class>
3905         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
3906                         oils_obj:fieldmapper="metabib::display_entry" 
3907                         oils_persist:tablename="metabib.display_entry" 
3908                         oils_persist:field_safe="true"
3909                         reporter:label="Display Field Entry" oils_persist:readonly="true">
3910                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
3911                         <field name="id" reporter:datatype="id" />
3912                         <field name="field" reporter:datatype="link"/>
3913                         <field name="source" reporter:datatype="link"/>
3914                         <field name="value"  reporter:datatype="text"/>
3915                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
3916                 </fields>
3917                 <links>
3918                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3919                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3920                 </links>
3921                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3922                         <actions>
3923                                 <retrieve/>
3924                         </actions>
3925                 </permacrud>
3926         </class>
3927         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
3928                 oils_persist:tablename="metabib.flat_display_entry"
3929                 oils_obj:fieldmapper="metabib::flat_display_entry" 
3930                 oils_persist:field_safe="true"
3931                 reporter:label="Flat Display Entry" 
3932                 oils_persist:readonly="true">
3933                 <fields>
3934                         <field name="source" reporter:datatype="id" />
3935                         <field name="name" reporter:datatype="text"/>
3936                         <field name="multi" reporter:datatype="bool"/>
3937                         <field name="label" reporter:datatype="text"/>
3938                         <field name="field" reporter:datatype="link"/>
3939                         <field name="value" reporter:datatype="text"/>
3940                 </fields>
3941                 <links>
3942                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3943                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3944                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
3945                 </links>
3946                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3947                         <actions>
3948                                 <retrieve/>
3949                         </actions>
3950                 </permacrud>
3951         </class>
3952         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
3953                 oils_persist:tablename="metabib.compressed_display_entry"
3954                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
3955                 oils_persist:field_safe="true"
3956                 reporter:label="Compressed Display Entry" 
3957                 oils_persist:readonly="true">
3958                 <fields>
3959                         <field name="source" reporter:datatype="id" />
3960                         <field name="name" reporter:datatype="text"/>
3961                         <field name="multi" reporter:datatype="bool"/>
3962                         <field name="label" reporter:datatype="text"/>
3963                         <field name="field" reporter:datatype="link"/>
3964                         <field name="value" reporter:datatype="text"/>
3965                 </fields>
3966                 <links>
3967                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3968                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3969                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
3970                 </links>
3971                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3972                         <actions>
3973                                 <retrieve/>
3974                         </actions>
3975                 </permacrud>
3976         </class>
3977         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
3978                 oils_persist:tablename="metabib.wide_display_entry"
3979                 oils_obj:fieldmapper="metabib::wide_display_entry" 
3980                 oils_persist:field_safe="true"
3981                 reporter:label="Wide Display Entry" 
3982                 oils_persist:readonly="true">
3983                 <fields oils_persist:primary="source">
3984                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
3985                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
3986                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
3987                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
3988                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
3989                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
3990                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
3991                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
3992                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
3993                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
3994                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
3995                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
3996                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
3997                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
3998                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
3999                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
4000                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
4001                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
4002                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
4003                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
4004                 </fields>
4005                 <links>
4006                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4007                 </links>
4008                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4009                         <actions>
4010                                 <retrieve/>
4011                         </actions>
4012                 </permacrud>
4013         </class>
4014
4015         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
4016                 oils_persist:tablename="config.display_field_map"
4017                 oils_obj:fieldmapper="config::display_field_map"
4018                 oils_persist:field_safe="true"
4019                 reporter:label="Display Field Map">
4020                 <fields oils_persist:primary="name">
4021                         <field name="name" reporter:datatype="text"/>
4022                         <field name="field" reporter:datatype="link"/>
4023                         <field name="multi" reporter:datatype="bool"/>
4024                 </fields>
4025                 <links>
4026                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4027                 </links>
4028                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4029                         <actions>
4030                                 <retrieve/>
4031                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
4032                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
4033                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
4034                         </actions>
4035                 </permacrud>
4036         </class>
4037
4038         <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">
4039                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
4040                         <field name="id" reporter:datatype="id" />
4041                         <field name="field" reporter:datatype="link"/>
4042                         <field name="source" reporter:datatype="link"/>
4043                         <field name="value"  reporter:datatype="text"/>
4044                 </fields>
4045                 <links>
4046                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4047                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4048                 </links>
4049         </class>
4050         <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">
4051                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
4052                         <field name="id" reporter:datatype="id" />
4053                         <field name="value" reporter:datatype="text"/>
4054                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4055                 </fields>
4056                 <links>
4057                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
4058                 </links>
4059         </class>
4060         <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">
4061                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
4062                         <field name="id" reporter:datatype="id" />
4063                         <field name="entry" reporter:datatype="link"/>
4064                         <field name="def" reporter:datatype="link"/>
4065                         <field name="source" reporter:datatype="link"/>
4066                 </fields>
4067                 <links>
4068                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4069                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
4070                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4071                 </links>
4072         </class>
4073         <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">
4074                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
4075                         <field name="id" reporter:datatype="id" />
4076                         <field name="entry" reporter:datatype="link"/>
4077                         <field name="simple_heading" reporter:datatype="link"/>
4078                 </fields>
4079                 <links>
4080                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4081                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
4082                 </links>
4083         </class>
4084         <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">
4085                 <oils_persist:source_definition>
4086                         SELECT * FROM metabib.author_field_entry
4087                                                 UNION ALL
4088                         SELECT * FROM metabib.keyword_field_entry
4089                                                 UNION ALL
4090                         SELECT * FROM metabib.identifier_field_entry
4091                                                 UNION ALL
4092                         SELECT * FROM metabib.title_field_entry
4093                                                 UNION ALL
4094                         SELECT * FROM metabib.subject_field_entry
4095                                                 UNION ALL
4096                         SELECT * FROM metabib.series_field_entry
4097                 </oils_persist:source_definition>
4098                 <fields>
4099                         <field name="field" reporter:datatype="link"/>
4100                         <field name="id" reporter:datatype="id" />
4101                         <field name="source" reporter:datatype="link"/>
4102                         <field name="value"  reporter:datatype="text"/>
4103                 </fields>
4104                 <links>
4105                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4106                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4107                 </links>
4108         </class>
4109         <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">
4110                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
4111                         <field name="field" reporter:datatype="link"/>
4112                         <field name="id" reporter:datatype="id" />
4113                         <field name="source" reporter:datatype="link"/>
4114                         <field name="value"  reporter:datatype="text"/>
4115                 </fields>
4116                 <links>
4117                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4118                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4119                 </links>
4120         </class>
4121         <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">
4122                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4123                         <field name="accepting_usr" reporter:datatype="link"/>
4124                         <field name="amount" reporter:datatype="money" />
4125                         <field name="amount_collected" reporter:datatype="money" />
4126                         <field name="cash_drawer" reporter:datatype="link"/>
4127                         <field name="id" reporter:datatype="id" />
4128                         <field name="note"  reporter:datatype="text"/>
4129                         <field name="payment_ts" reporter:datatype="timestamp"/>
4130                         <field name="xact" reporter:datatype="link"/>
4131                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4132                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4133                 </fields>
4134                 <links>
4135                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4136                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4137                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4138                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4139                 </links>
4140         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4141             <actions>
4142                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4143                     <context link="xact" jump="usr" field="home_ou"/>
4144                 </retrieve>
4145                         </actions>
4146                 </permacrud>
4147         </class>
4148         <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">
4149                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4150                         <field name="accepting_usr" reporter:datatype="link"/>
4151                         <field name="amount" reporter:datatype="money" />
4152                         <field name="amount_collected" reporter:datatype="money" />
4153                         <field name="id" reporter:datatype="id" />
4154                         <field name="note"  reporter:datatype="text"/>
4155                         <field name="payment_ts" reporter:datatype="timestamp"/>
4156                         <field name="xact" reporter:datatype="link"/>
4157                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4158                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4159                 </fields>
4160                 <links>
4161                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4162                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4163                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4164                 </links>
4165         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4166             <actions>
4167                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4168                     <context link="xact" jump="usr" field="home_ou"/>
4169                 </retrieve>
4170                         </actions>
4171                 </permacrud>
4172         </class>
4173         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4174                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4175                         <field name="accepting_usr" reporter:datatype="link"/>
4176                         <field name="amount" reporter:datatype="money" />
4177                         <field name="amount_collected" reporter:datatype="money" />
4178                         <field name="id" reporter:datatype="id" />
4179                         <field name="note"  reporter:datatype="text"/>
4180                         <field name="payment_ts" reporter:datatype="timestamp"/>
4181                         <field name="xact" reporter:datatype="link"/>
4182                         <field name="billing" reporter:datatype="link"/>
4183                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4184                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4185                 </fields>
4186                 <links>
4187                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4188                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4189                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4190                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4191                 </links>
4192         </class>
4193         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4194                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4195                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4196                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4197                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4198                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4199                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4200                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4201                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4202                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4203                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4204                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4205                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4206                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4207                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4208                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4209                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4210                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4211                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4212                 </fields>
4213                 <links>
4214                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4215                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4216                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4217                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4218                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4219                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4220                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4221                 </links>
4222         </class>
4223
4224         <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">
4225                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4226                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4227                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4228                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4229                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4230                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4231                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4232                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4233                 </fields>
4234                 <links/>
4235         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4236             <actions>
4237                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4238                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
4239                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4240                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4241             </actions>
4242         </permacrud>
4243         </class>
4244         <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">
4245                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4246                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4247                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4248                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4249                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4250                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4251                 </fields>
4252                 <links>
4253                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4254                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4255                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4256         </links>
4257         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4258             <actions>
4259                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4260                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4261                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4262                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4263             </actions>
4264         </permacrud>
4265         </class>
4266         <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">
4267                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4268                         <field name="holdable" reporter:datatype="bool"/>
4269                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4270                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4271                         <field name="opac_visible" reporter:datatype="bool"/>
4272             <field name="copy_active" reporter:datatype="bool"/>
4273             <field name="restrict_copy_delete" reporter:datatype="bool"/>
4274             <field name="is_available" reporter:datatype="bool"/>
4275                 </fields>
4276                 <links/>
4277         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4278             <actions>
4279                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4280                 <retrieve/>
4281                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4282                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4283             </actions>
4284         </permacrud>
4285         </class>
4286         <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">
4287                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
4288                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4289                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4290                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4291                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4292                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4293                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4294                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4295                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
4296                 </fields>
4297                 <links>
4298                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4299                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4300                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4301                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4302                 </links>
4303                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4304                         <actions>
4305                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4306                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4307                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4308                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4309                         </actions>
4310                 </permacrud>
4311         </class>
4312         <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">
4313                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4314                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4315                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4316                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4317                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4318                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4319                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4320                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4321                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4322                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4323                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4324                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4325                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4326                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4327                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4328                 </fields>
4329                 <links>
4330                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4331                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4332                 </links>
4333                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4334                         <actions>
4335                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4336                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4337                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4338                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4339                         </actions>
4340                 </permacrud>
4341         </class>
4342         <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">
4343                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4344                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4345                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4346                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4347                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4348                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4349                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4350                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4351                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4352                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4353                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4354                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4355                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4356                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4357                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4358                 </fields>
4359                 <links>
4360                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4361                 </links>
4362                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4363                         <actions>
4364                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4365                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4366                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4367                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4368                         </actions>
4369                 </permacrud>
4370         </class>
4371
4372
4373         <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">
4374                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4375                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4376                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4377                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4378                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4379                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4380                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4381                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4382                 </fields>
4383                 <links>
4384                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4385                 </links>
4386         </class>
4387
4388         <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">
4389                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4390                         <field name="call_number" />
4391                         <field name="create_date" reporter:datatype="timestamp"/>
4392                         <field name="creator" reporter:datatype="link"/>
4393                         <field name="id" reporter:datatype="id" />
4394                         <field name="pub" reporter:datatype="bool"/>
4395                         <field name="title"  reporter:datatype="text"/>
4396                         <field name="value"  reporter:datatype="text"/>
4397                 </fields>
4398                 <links>
4399                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4400                 </links>
4401         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4402             <actions>
4403                 <create permission="CREATE_VOLUME_NOTE">
4404                     <context link="call_number" field="owning_lib"/>
4405                 </create>
4406                 <retrieve permission="VIEW_VOLUME_NOTES">
4407                     <context link="call_number" field="owning_lib"/>
4408                 </retrieve>
4409                 <update permission="UPDATE_VOLUME_NOTE">
4410                     <context link="call_number" field="owning_lib"/>
4411                 </update>
4412                 <delete permission="DELETE_VOLUME_NOTE">
4413                     <context link="call_number" field="owning_lib"/>
4414                 </delete>
4415             </actions>
4416         </permacrud>
4417         </class>
4418         <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">
4419                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4420                         <field name="create_date" reporter:datatype="timestamp"/>
4421                         <field name="creator" reporter:datatype="link"/>
4422                         <field name="edit_date" reporter:datatype="timestamp"/>
4423                         <field name="editor" reporter:datatype="link"/>
4424                         <field name="id" reporter:datatype="id" />
4425                         <field name="record" reporter:datatype="link"/>
4426                         <field name="value" reporter:datatype="text"/>
4427                 </fields>
4428                 <links>
4429                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4430                 </links>
4431         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4432             <actions>
4433                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4434                 <retrieve/>
4435                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4436                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4437             </actions>
4438         </permacrud>
4439         </class>
4440         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4441         <oils_persist:source_definition>
4442 SELECT  usr,
4443         SUM(
4444             CASE
4445                 WHEN (
4446                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4447                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4448                 ) THEN 1
4449                 ELSE 0
4450             END
4451         ) AS out,
4452
4453         SUM(
4454             CASE
4455                 WHEN (
4456                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4457                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4458                 ) THEN 1
4459                 ELSE 0
4460             END
4461         ) AS overdue,
4462
4463         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4464         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4465         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4466   FROM  action.circulation
4467   WHERE checkin_time IS NULL
4468   GROUP BY 1
4469         </oils_persist:source_definition>
4470         <fields oils_persist:primary="usr">
4471             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4472             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4473             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4474             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4475             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4476             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4477         </fields>
4478         <links>
4479             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4480         </links>
4481         </class>
4482         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4483         <oils_persist:source_definition>
4484 SELECT  usr,
4485         STRING_AGG(
4486             CASE
4487                 WHEN (
4488                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4489                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4490                 ) THEN id::TEXT
4491                 ELSE '0'
4492             END
4493         ,',') AS out,
4494
4495         STRING_AGG(
4496             CASE
4497                 WHEN (
4498                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4499                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4500                 ) THEN id::TEXT
4501                 ELSE '0'
4502             END
4503         ,',') AS overdue,
4504
4505         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4506         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4507         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4508   FROM  action.circulation
4509   WHERE checkin_time IS NULL
4510   GROUP BY 1
4511         </oils_persist:source_definition>
4512         <fields oils_persist:primary="usr">
4513             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4514             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4515             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4516             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4517             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4518             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4519         </fields>
4520         <links>
4521             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4522         </links>
4523         </class>
4524         <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">
4525                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4526                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4527                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4528                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4529                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4530                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4531                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4532                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4533                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4534                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4535                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4536                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4537                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4538                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4539                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4540                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4541                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4542                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4543                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4544                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4545                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4546                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4547                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4548                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4549                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4550                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4551                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4552                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4553                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4554                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4555                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4556                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4557                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4558                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4559                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4560                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4561                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4562                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4563                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4564                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4565                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4566                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4567                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4568                 </fields>
4569                 <links>
4570                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4571                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4572                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4573                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4574                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4575                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4576                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4577                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4578                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4579                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4580                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4581                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4582                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4583                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4584                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4585                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4586                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4587                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4588                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4589                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4590                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4591                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4592                 </links>
4593                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4594                         <actions>
4595                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4596                         </actions>
4597                 </permacrud>
4598         </class>
4599         <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">
4600                 <fields>
4601                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4602                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4603                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4604                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4605                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4606                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4607                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4608                 </fields>
4609                 <links>
4610                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4611                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4612                 </links>
4613                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4614                         <actions>
4615                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4616                         </actions>
4617                 </permacrud>
4618         </class>
4619         <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">
4620                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4621                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4622                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4623                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4624                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4625                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4626                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4627                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4628                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4629                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4630                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4631                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4632                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4633                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4634                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4635                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4636                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4637                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4638                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4639                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4640                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4641                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4642                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4643                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4644                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4645                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4646                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4647                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4648                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4649                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4650                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4651                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4652                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4653                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4654                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4655                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4656                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4657                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4658                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4659                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4660                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4661                 </fields>
4662                 <links>
4663                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4664                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4665                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4666                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4667                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4668                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4669                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4670                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4671                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4672                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4673                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4674                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4675                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4676                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4677                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4678                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4679                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4680                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4681                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4682                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4683                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4684                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4685                 </links>
4686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4687                         <actions>
4688                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4689                         </actions>
4690                 </permacrud>
4691         </class>
4692
4693         <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">
4694                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4695                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4696                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4697                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4698                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4699                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4700                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4701                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4702                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4703                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4704                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4705                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4706                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4707                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4708                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4709                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4710                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4711                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4712                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4713                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4714                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4715                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4716                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4717                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4718                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4719                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4720                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4721                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4722                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4723                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4724                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4725                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4726                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4727                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4728                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4729                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4730                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4731                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4732                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4733                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4734                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4735                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4736                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4737                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4738                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4739                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4740                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4741                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4742                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4743                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4744                 </fields>
4745                 <links>
4746                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4747                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4748                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4749                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4750                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4751                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4752                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4753                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4754                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4755                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4756                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4757                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4758                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4759                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4760                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4761                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4762                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4763                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4764                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4765                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4766                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4767                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4768                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4769                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4770                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4771                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4772                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4773                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4774                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4775                 </links>
4776                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4777                         <actions>
4778                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4779                         </actions>
4780                 </permacrud>
4781         </class>
4782         <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">
4783                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4784                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4785                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4786                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4787                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4788                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4789                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4790                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4791                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4792                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4793                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4794                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4795                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4796                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4797                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4798                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4799                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4800                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4801                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4802                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4803                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4804                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4805                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4806                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4807                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4808                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4809                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4810                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4811                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4812                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4813                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4814                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4815                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4816                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4817                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4818                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4819                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4820                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4821                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4822                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4823                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4824                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4825                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4826                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4827                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4828                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4829                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4830                 </fields>
4831                 <links>
4832                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4833                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4834                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4835                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4836                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4837                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4838                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4839                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4840                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4841                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4842                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4843                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4844                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4845                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4846                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4847                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4848                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4849                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4850                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4851                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4852                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4853                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4854                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4855                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4856                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4857                 </links>
4858         </class>
4859         <class id="auch" 
4860                 controller="open-ils.cstore" 
4861                 oils_obj:fieldmapper="action::user_circ_history" 
4862                 oils_persist:tablename="action.usr_circ_history" 
4863                 reporter:label="User Checkout History">
4864                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4865                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4866                         <!-- prevent reporting on the user that owns the checkout history -->
4867                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4868                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4869                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4870                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4871                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4872                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4873                 </fields>
4874                 <links>
4875                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4876                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4877                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4878                 </links>
4879         </class>
4880         <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">
4881                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4882                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4883                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4884                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4885                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4886                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4887                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4888                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4889                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4890                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4891                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4892                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4893                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4894                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4895                 </fields>
4896                 <links>
4897                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4898                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4899                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4900                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4901                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4902                 </links>
4903                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4904                         <actions>
4905                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4906                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4907                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4908                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4909                         </actions>
4910                 </permacrud>
4911         </class>
4912
4913         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4914                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4915                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4916                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4917                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4918                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4919                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4920                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4921                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4922                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4923                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4924                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4925                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4926                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4927                 </fields>
4928                 <links>
4929                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4930                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4931                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4932                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4933                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4934                 </links>
4935                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4936                         <actions>
4937                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4938                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4939                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4940                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4941                         </actions>
4942                 </permacrud>
4943         </class>
4944         
4945         <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">
4946                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4947                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4948                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4949                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4950                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4951                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4952                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4953                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4954                 </fields>
4955                 <links>
4956                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4957                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4958                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4959                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4960                 </links>
4961                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4962                         <actions>
4963                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4964                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4965                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4966                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4967                         </actions>
4968                 </permacrud>
4969         </class>
4970         
4971         <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">
4972                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4973                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4974                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4975                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4976                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4977                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4978                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4979                 </fields>
4980                 <links>
4981                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4982                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4983                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4984                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4985                 </links>
4986                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4987                         <actions>
4988                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4989                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4990                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4991                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4992                         </actions>
4993                 </permacrud>
4994         </class>
4995         
4996         <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">
4997                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4998                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4999                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
5000                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
5001                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
5002                 </fields>
5003                 <links>
5004                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
5005                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
5006                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
5007                 </links>
5008                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5009                         <actions>
5010                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5011                     <context link="resource" field="owner" />
5012                 </create>
5013                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5014                     <context link="resource" field="owner" />
5015                 </retrieve>
5016                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5017                     <context link="resource" field="owner" />
5018                 </update>
5019                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5020                     <context link="resource" field="owner" />
5021                 </delete>
5022                         </actions>
5023                 </permacrud>
5024         </class>
5025         
5026         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
5027                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5028                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5029                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5030                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5031                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5032                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5033                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5034                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5035                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5036                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5037                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5038                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
5039                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
5040                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
5041                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
5042                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
5043                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
5044                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
5045                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
5046                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5047                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5048                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5049                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
5050                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
5051                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
5052                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
5053                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
5054                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
5055                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5056                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5057                 </fields>
5058                 <links>
5059                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5060                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5061                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5062                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5063                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5064                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5065                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
5066                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5067                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5068                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5069                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
5070                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
5071                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
5072                 </links>
5073                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5074                         <actions>
5075                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5076                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5077                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5078                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5079                         </actions>
5080                 </permacrud>
5081         </class>
5082         
5083         <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">
5084                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
5085                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
5086                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
5087                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
5088                 </fields>
5089                 <links>
5090                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5091                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
5092                 </links>
5093                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5094                         <actions>
5095                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5096                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5097                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5098                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5099                         </actions>
5100                 </permacrud>
5101         </class>
5102
5103         <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">
5104                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
5105                         <field name="bucket" reporter:datatype="link"/>
5106                         <field name="id" reporter:datatype="id" />
5107                         <field name="target_call_number" reporter:datatype="link" />
5108                         <field name="create_time" reporter:datatype="timestamp" />
5109                         <field name="pos" reporter:datatype="int" />
5110                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5111                 </fields>
5112                 <links>
5113                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
5114                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5115             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
5116                 </links>
5117                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5118                         <actions>
5119                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
5120                     <context link="bucket" owning_lib="owning_lib"/>
5121                 </retrieve>
5122             </actions>
5123         </permacrud>
5124         </class>
5125         <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">
5126                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
5127                         <field name="id" reporter:datatype="id" />
5128                         <field name="item" reporter:datatype="link"/>
5129                         <field name="note" reporter:datatype="text" />
5130                 </fields>
5131                 <links>
5132                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
5133                 </links>
5134         </class>
5135         <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">
5136                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
5137                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5138                         <field name="btype" reporter:datatype="text"/>
5139                         <field name="id" reporter:datatype="id" />
5140                         <field name="name" reporter:datatype="text"/>
5141                         <field name="description" reporter:datatype="text"/>
5142                         <field name="owner" reporter:datatype="link"/>
5143                         <field name="pub" reporter:datatype="bool"/>
5144                         <field name="create_time" reporter:datatype="timestamp" />
5145                         <field name="owning_lib" reporter:datatype="org_unit" />
5146                 </fields>
5147                 <links>
5148                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5149                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5150                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5151                 </links>
5152                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5153                         <actions>
5154                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5155                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5156                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5157                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5158                         </actions>
5159                 </permacrud>
5160         </class>
5161         <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">
5162                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5163                         <field name="id" reporter:datatype="id" />
5164                         <field name="bucket" reporter:datatype="link"/>
5165                         <field name="note" reporter:datatype="text" />
5166                 </fields>
5167                 <links>
5168                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5169                 </links>
5170         </class>
5171         <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">
5172                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5173                         <field name="hold" reporter:datatype="link"/>
5174                         <field name="id" reporter:datatype="id" />
5175                         <field name="target_copy" reporter:datatype="link"/>
5176                         <field name="proximity" reporter:datatype="number"/>
5177                 </fields>
5178                 <links>
5179                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5180                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5181                 </links>
5182         </class>
5183         <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">
5184                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5185                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5186                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5187                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5188                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5189                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5190                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5191                 </fields>
5192                 <links>
5193                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5194                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5195                 </links>
5196         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5197             <actions>
5198                 <create permission="CREATE_HOLD_NOTIFICATION">
5199                                         <context link="hold" jump="usr" field="home_ou" />
5200                                 </create>
5201                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5202                                         <context link="hold" jump="usr" field="home_ou" />
5203                                 </retrieve>
5204                 <update permission="CREATE_HOLD_NOTIFICATION">
5205                                         <context link="hold" jump="usr" field="home_ou" />
5206                                 </update>
5207                 <delete permission="CREATE_HOLD_NOTIFICATION">
5208                                         <context link="hold" jump="usr" field="home_ou" />
5209                                 </delete>
5210             </actions>
5211         </permacrud>
5212         </class>
5213         <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">
5214                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5215                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5216                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5217                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5218                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5219                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5220                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5221                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5222                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5223                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5224                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5225                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5226                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5227                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5228                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5229                 </fields>
5230                 <links>
5231                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5232                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5233                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5234                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5235                 </links>
5236         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5237             <actions>
5238                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5239                 <retrieve/>
5240                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5241                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5242             </actions>
5243         </permacrud>
5244         </class>
5245         <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">
5246                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5247                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5248                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5249                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5250                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
5251             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5252             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5253             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5254                 </fields>
5255                 <links>
5256                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5257                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5258                 </links>
5259         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5260             <actions>
5261                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5262                 <retrieve/>
5263                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5264                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5265             </actions>
5266         </permacrud>
5267         </class>
5268         <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">
5269                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5270                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5271             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5272             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5273                 </fields>
5274                 <links>
5275                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5276                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5277                 </links>
5278         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5279             <actions>
5280                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5281                                         <context link="lgroup" field="owner" />
5282                 </create>
5283                 <retrieve/>
5284                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5285                                         <context link="lgroup" field="owner" />
5286                 </update>
5287                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5288                                         <context link="lgroup" field="owner" />
5289                 </delete>
5290             </actions>
5291         </permacrud>
5292         </class>
5293
5294     <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">
5295         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5296             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5297             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5298             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5299             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5300         </fields>
5301         <links>
5302             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5303             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5304         </links>
5305         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5306             <actions>
5307                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5308                 <retrieve/>
5309                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5310                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5311             </actions>
5312         </permacrud>
5313     </class>
5314
5315         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5316                 <fields>
5317                         <field name="sre_id" oils_persist:virtual="true" />
5318                         <field name="location" oils_persist:virtual="true" />
5319                         <field name="owning_lib" oils_persist:virtual="true" />
5320                         <field name="basic_holdings" oils_persist:virtual="true" />
5321                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5322                         <field name="supplement_holdings" oils_persist:virtual="true" />
5323                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5324                         <field name="index_holdings" oils_persist:virtual="true" />
5325                         <field name="index_holdings_add" oils_persist:virtual="true" />
5326                         <field name="online" oils_persist:virtual="true" />
5327                         <field name="missing" oils_persist:virtual="true" />
5328                         <field name="incomplete" oils_persist:virtual="true" />
5329                 </fields>
5330         </class>
5331
5332         <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">
5333                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5334                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5335                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5336                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5337                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5338                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5339                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5340                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5341                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5342                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5343                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5344                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5345                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5346                 </fields>
5347                 <links>
5348                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5349                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5350                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5351                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5352                 </links>
5353                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5354                         <actions>
5355                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5356                                 <retrieve/>
5357                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5358                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5359                         </actions>
5360                 </permacrud>
5361         </class>
5362
5363         <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">
5364                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5365                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5366                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5367                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5368                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5369                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5370                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5371                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5372                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5373                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5374                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5375                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5376                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5377                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5378                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5379                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5380                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5381                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5382                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5383                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5384                 </fields>
5385                 <links>
5386                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5387                 </links>
5388                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5389                         <actions>
5390                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5391                                         <context link="subscription" field="owning_lib" />
5392                                 </create>
5393                                 <retrieve />
5394                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5395                                         <context link="subscription" field="owning_lib" />
5396                                 </update>
5397                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5398                                         <context link="subscription" field="owning_lib" />
5399                                 </delete>
5400                         </actions>
5401                 </permacrud>
5402         </class>
5403
5404         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5405                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5406                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5407                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5408                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5409                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5410                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5411                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5412                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5413                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5414                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5415                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5416                 </fields>
5417                 <links>
5418                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5419                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5420                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5421                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5422                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5423                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5424                 </links>
5425                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5426                         <actions>
5427                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5428                                 <retrieve />
5429                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5430                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5431                         </actions>
5432                 </permacrud>
5433         </class>
5434
5435         <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">
5436                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5437                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5438                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5439                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5440                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5441                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5442                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5443                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5444                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5445                 </fields>
5446                 <links>
5447                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5448                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5449                 </links>
5450                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5451                         <actions>
5452                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5453                     <context link="subscription" field="owning_lib"/>
5454                 </create>
5455                                 <retrieve />
5456                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5457                     <context link="subscription" field="owning_lib"/>
5458                 </update>
5459                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5460                     <context link="subscription" field="owning_lib"/>
5461                 </delete>
5462                         </actions>
5463                 </permacrud>
5464         </class>
5465
5466         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5467                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5468                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5469                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5470                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5471                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5472                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5473                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5474                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5475                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5476                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5477                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5478                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5479                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5480                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5481                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5482                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5483                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5484                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5485                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5486                 </fields>
5487                 <links>
5488                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5489                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5490                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5491                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5492                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5493                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5494                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5495                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5496                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5497                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5498                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5499                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5500                 </links>
5501                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5502                         <actions>
5503                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5504                                 <retrieve />
5505                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5506                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5507                         </actions>
5508                 </permacrud>
5509         </class>
5510
5511         <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">
5512                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5513                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5514                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5515                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5516                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5517                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5518                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5519                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5520                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5521                 </fields>
5522                 <links>
5523                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5524                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5525                 </links>
5526                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5527                         <actions>
5528                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5529                                         <context link="distribution" field="holding_lib" />
5530                                 </create>
5531                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5532                                         <context link="distribution" field="holding_lib" />
5533                                 </retrieve>
5534                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5535                                         <context link="distribution" field="holding_lib" />
5536                                 </update>
5537                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5538                                         <context link="distribution" field="holding_lib" />
5539                                 </delete>
5540                         </actions>
5541                 </permacrud>
5542         </class>
5543
5544         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5545                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5546                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5547                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5548                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5549                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5550                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5551                 </fields>
5552                 <links>
5553                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5554                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5555                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5556                 </links>
5557                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5558                         <actions>
5559                                 <create permission="ADMIN_SERIAL_STREAM">
5560                                         <context link="distribution" field="holding_lib" />
5561                                 </create>
5562                                 <retrieve />
5563                                 <update permission="ADMIN_SERIAL_STREAM">
5564                                         <context link="distribution" field="holding_lib" />
5565                                 </update>
5566                                 <delete permission="ADMIN_SERIAL_STREAM">
5567                                         <context link="distribution" field="holding_lib" />
5568                                 </delete>
5569                         </actions>
5570                 </permacrud>
5571         </class>
5572
5573         <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">
5574                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5575                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5576                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5577                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5578                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5579                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5580                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5581                 </fields>
5582                 <links>
5583                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5584                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5585                 </links>
5586                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5587                         <actions>
5588                                 <create permission="ADMIN_SERIAL_STREAM">
5589                                         <context link="stream" jump="distribution" field="holding_lib" />
5590                                 </create>
5591                                 <retrieve permission="RECEIVE_SERIAL">
5592                                         <context link="stream" jump="distribution" field="holding_lib" />
5593                                 </retrieve>
5594                                 <update permission="ADMIN_SERIAL_STREAM">
5595                                         <context link="stream" jump="distribution" field="holding_lib" />
5596                                 </update>
5597                                 <delete permission="ADMIN_SERIAL_STREAM">
5598                                         <context link="stream" jump="distribution" field="holding_lib" />
5599                                 </delete>
5600                         </actions>
5601                 </permacrud>
5602         </class>
5603
5604         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5605                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5606                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5607                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5608                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5609                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5610                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5611                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5612                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5613                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5614                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5615                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5616                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5617                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5618                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5619                 </fields>
5620                 <links>
5621                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5622                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5623                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5624                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5625                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5626                 </links>
5627                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5628                         <actions>
5629                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5630                                         <context link="subscription" field="owning_lib" />
5631                                 </create>
5632                                 <retrieve/>
5633                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5634                                         <context link="subscription" field="owning_lib" />
5635                                 </update>
5636                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5637                                         <context link="subscription" field="owning_lib" />
5638                                 </delete>
5639                         </actions>
5640                 </permacrud>
5641         </class>
5642
5643         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5644                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5645                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5646                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5647                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5648                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5649                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5650                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5651                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5652                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5653                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5654                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5655                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5656                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5657                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5658                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5659                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5660                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5661                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5662                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5663                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5664                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5665                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5666                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5667                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5668                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5669                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5670                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5671                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5672                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5673                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5674                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5675                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5676                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5677                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5678                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5679                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5680                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5681                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5682                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5683                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5684                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5685                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5686                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5687                 </fields>
5688                 <links>
5689                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5690                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5691                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5692                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5693                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5694                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5695                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5696                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5697                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5698                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5699                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5700                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5701                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5702                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5703                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5704                 </links>
5705                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5706                         <actions>
5707                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5708                                 <retrieve/>
5709                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5710                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5711                         </actions>
5712                 </permacrud>
5713         </class>
5714
5715         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5716                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5717                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5718                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5719                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5720                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5721                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5722                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5723                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5724                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5725                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5726                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5727                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5728                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5729                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5730                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5731                 </fields>
5732                 <links>
5733                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5734                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5735                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5736                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5737                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5738                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5739                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5740                 </links>
5741                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5742                         <actions>
5743                                 <create permission="ADMIN_SERIAL_ITEM">
5744                                         <context link="stream" jump="distribution" field="holding_lib" />
5745                                 </create>
5746                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5747                                         <context link="stream" jump="distribution" field="holding_lib" />
5748                                 </retrieve>
5749                                 <update permission="ADMIN_SERIAL_ITEM">
5750                                         <context link="stream" jump="distribution" field="holding_lib" />
5751                                 </update>
5752                                 <delete permission="ADMIN_SERIAL_ITEM">
5753                                         <context link="stream" jump="distribution" field="holding_lib" />
5754                                 </delete>
5755                         </actions>
5756                 </permacrud>
5757         </class>
5758
5759         <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">
5760                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5761                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5762                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5763                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5764                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5765                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5766                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5767                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5768                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5769                 </fields>
5770                 <links>
5771                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5772                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5773                 </links>
5774                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5775                         <actions>
5776                                 <create permission="ADMIN_SERIAL_ITEM">
5777                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5778                                 </create>
5779                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5780                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5781                                 </retrieve>
5782                                 <update permission="ADMIN_SERIAL_ITEM">
5783                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5784                                 </update>
5785                                 <delete permission="ADMIN_SERIAL_ITEM">
5786                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5787                                 </delete>
5788                         </actions>
5789                 </permacrud>
5790         </class>
5791         <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">
5792                 <fields>
5793                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5794                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5795                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5796                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5797                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5798                 </fields>
5799                 <links>
5800                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5801                 </links>
5802         </class>
5803         <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">
5804                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5805                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5806                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5807                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5808                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5809                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5810                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5811                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5812                 </fields>
5813                 <links>
5814                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5815                 </links>
5816         </class>
5817         <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">
5818                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5819                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5820                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5821                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5822                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5823                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5824                 </fields>
5825                 <links>
5826                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5827                 </links>
5828                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5829                         <actions>
5830                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5831                                         <context link="distribution" field="holding_lib" />
5832                                 </create>
5833                                 <retrieve/>
5834                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5835                                         <context link="distribution" field="holding_lib" />
5836                                 </update>
5837                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5838                                         <context link="distribution" field="holding_lib" />
5839                                 </delete>
5840                         </actions>
5841                 </permacrud>
5842         </class>
5843
5844         <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">
5845                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5846                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5847                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5848                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5849                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5850                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5851                 </fields>
5852                 <links>
5853                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5854                 </links>
5855                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5856                         <actions>
5857                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5858                                         <context link="distribution" field="holding_lib" />
5859                                 </create>
5860                                 <retrieve/>
5861                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5862                                         <context link="distribution" field="holding_lib" />
5863                                 </update>
5864                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5865                                         <context link="distribution" field="holding_lib" />
5866                                 </delete>
5867                         </actions>
5868                 </permacrud>
5869         </class>
5870
5871         <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">
5872                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5873                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5874                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5875                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5876                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5877                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5878                 </fields>
5879                 <links>
5880                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5881                 </links>
5882                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5883                         <actions>
5884                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5885                                         <context link="distribution" field="holding_lib" />
5886                                 </create>
5887                                 <retrieve/>
5888                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5889                                         <context link="distribution" field="holding_lib" />
5890                                 </update>
5891                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5892                                         <context link="distribution" field="holding_lib" />
5893                                 </delete>
5894                         </actions>
5895                 </permacrud>
5896         </class>
5897
5898         <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">
5899                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
5900                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5901                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5902                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
5903                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
5904                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
5905                 </fields>
5906                 <links>
5907                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5908                 </links>
5909                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5910                         <actions>
5911                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5912                                 <retrieve/>
5913                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5914                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5915                         </actions>
5916                 </permacrud>
5917         </class>
5918
5919         <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">
5920                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5921                         <field name="id" reporter:datatype="id" />
5922                         <field name="owning_copy" reporter:datatype="link"/>
5923                         <field name="stat_cat" reporter:datatype="link"/>
5924                         <field name="stat_cat_entry" reporter:datatype="link"/>
5925                 </fields>
5926                 <links>
5927                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5928                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5929                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5930                 </links>
5931                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5932                         <actions>
5933                                 <retrieve/>
5934                         </actions>
5935                 </permacrud>
5936         </class>
5937         <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">
5938                 <fields oils_persist:primary="code">
5939                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5940                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5941                 </fields>
5942                 <links/>
5943         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5944             <actions>
5945                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5946                 <retrieve/>
5947                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5948                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5949             </actions>
5950         </permacrud>
5951         </class>
5952         <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">
5953                 <fields oils_persist:primary="code">
5954                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5955                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5956                 </fields>
5957                 <links/>
5958         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5959             <actions>
5960                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5961                 <retrieve/>
5962                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5963                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5964             </actions>
5965         </permacrud>
5966         </class>
5967         <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">
5968                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5969                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5970                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5971                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5972                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5973                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5974                 </fields>
5975                 <links>
5976             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5977         </links>
5978         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5979             <actions>
5980                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5981                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5982                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5983                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5984             </actions>
5985         </permacrud>
5986         </class>
5987         <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">
5988                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5989                         <field name="id" reporter:datatype="id" />
5990                         <field name="name" reporter:datatype="text"/>
5991                 </fields>
5992                 <links/>
5993         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5994             <actions>
5995                 <create permission="CREATE_LASSO" global_required="true"/>
5996                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5997                 <update permission="UPDATE_LASSO" global_required="true"/>
5998                 <delete permission="DELETE_LASSO" global_required="true"/>
5999             </actions>
6000         </permacrud>
6001         </class>
6002         <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">
6003                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
6004                         <field name="id" reporter:datatype="id" />
6005                         <field name="lasso" reporter:datatype="link"/>
6006                         <field name="org_unit" reporter:datatype="org_unit"/>
6007                 </fields>
6008                 <links>
6009                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
6010                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6011                 </links>
6012         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6013             <actions>
6014                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
6015                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
6016                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
6017                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
6018             </actions>
6019         </permacrud>
6020         </class>
6021         <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">
6022                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
6023                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6024                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
6025                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
6026                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
6027                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
6028                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
6029                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
6030                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
6031                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
6032                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
6033                 </fields>
6034                 <links>
6035                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6036                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6037                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6038                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
6039                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
6040                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
6041                 </links>
6042         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6043             <actions>
6044                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6045                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6046                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6047                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6048             </actions>
6049         </permacrud>
6050         </class>
6051         <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">
6052                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6053                         <field name="id" reporter:datatype="id" />
6054                         <field name="from_org" reporter:datatype="org_unit"/>
6055                         <field name="to_org" reporter:datatype="org_unit"/>
6056                         <field name="prox" reporter:datatype="int" />
6057                 </fields>
6058                 <links>
6059                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
6060                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
6061                 </links>
6062         </class>
6063         <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">
6064                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6065                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6066                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
6067                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6068                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
6069                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
6070                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
6071                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
6072                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
6073                 </fields>
6074                 <links/>
6075         </class>
6076         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
6077                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
6078                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
6079                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6080                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6081                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
6082                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
6083                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6084                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
6085                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6086                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
6087                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
6088                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
6089                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
6090                 </fields>
6091                 <links>
6092                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6093                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
6094                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
6095                 </links>
6096         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6097             <actions>
6098                 <create permission="ADMIN_SURVEY" context_field="owner"/>
6099                 <retrieve/>
6100                 <update permission="ADMIN_SURVEY" context_field="owner"/>
6101                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
6102             </actions>
6103         </permacrud>
6104         </class>
6105         <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">
6106                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
6107                         <field name="address_type"  reporter:datatype="text"/>
6108                         <field name="city"  reporter:datatype="text"/>
6109                         <field name="country"  reporter:datatype="text"/>
6110                         <field name="county"  reporter:datatype="text"/>
6111                         <field name="id" reporter:datatype="id" />
6112                         <field name="org_unit" reporter:datatype="org_unit"/>
6113                         <field name="post_code"  reporter:datatype="text"/>
6114                         <field name="state"  reporter:datatype="text"/>
6115                         <field name="street1"  reporter:datatype="text"/>
6116                         <field name="street2"  reporter:datatype="text"/>
6117                         <field name="valid" reporter:datatype="bool"/>
6118                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
6119                 </fields>
6120                 <links>
6121                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6122                 </links>
6123         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6124             <actions>
6125                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
6126                 <retrieve/>
6127                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
6128                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
6129             </actions>
6130         </permacrud>
6131         </class>
6132         <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">
6133                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
6134                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6135                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6136                         <field name="query_text" reporter:datatype="text"/>
6137                 </fields>
6138         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6139             <actions>
6140                 <retrieve/>
6141             </actions>
6142         </permacrud>
6143         </class>
6144
6145         <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">
6146                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
6147                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6148                         <field name="owner" reporter:datatype="org_unit"/>
6149                         <field name="code" reporter:datatype="text"/>
6150                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6151                         <field name="create_date" reporter:datatype="timestamp"/>
6152                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6153                 </fields>
6154                 <links>
6155                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6156                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6157                 </links>
6158         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6159             <actions>
6160                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6161                 <retrieve/>
6162                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6163                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6164             </actions>
6165         </permacrud>
6166         </class>
6167         <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">
6168                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6169                         <field name="id" reporter:datatype="id"/>
6170                         <field name="grp" reporter:datatype="link"/>
6171                         <field name="pos" reporter:datatype="int"/>
6172                         <field name="query" reporter:datatype="link"/>
6173                 </fields>
6174                 <links>
6175                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6176                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6177                 </links>
6178         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6179             <actions>
6180                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6181                     <context link="grp" field="owner"/>
6182                 </create>
6183                 <retrieve/>
6184                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6185                     <context link="grp" field="owner"/>
6186                 </update>
6187                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6188                     <context link="grp" field="owner"/>
6189                 </delete>
6190             </actions>
6191         </permacrud>
6192         </class>
6193
6194         <!-- A note: Please update alhr and ahopl when updating ahr -->
6195         <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">
6196                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6197                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6198                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6199                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6200                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6201                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6202                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6203                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6204                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6205                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6206                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6207                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6208                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6209                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6210                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6211                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6212                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6213                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6214                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6215                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6216                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6217                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6218                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6219                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6220                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6221                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6222                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6223                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6224                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6225                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6226                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6227                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6228                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6229                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6230                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6231                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6232                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6233                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6234                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6235                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6236                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6237                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6238                 </fields>
6239                 <links>
6240                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6241                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6242                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6243                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6244                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6245                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6246                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6247                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6248                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6249                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6250                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6251                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6252                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6253                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6254                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6255                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6256                 </links>
6257                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6258                         <actions>
6259                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6260                         </actions>
6261                 </permacrud>
6262         </class>
6263         <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">
6264                 <oils_persist:source_definition><![CDATA[
6265                 SELECT
6266                         ahr.*,
6267                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6268                                 copy_location_order_position,
6269                         CASE WHEN au.alias IS NOT NULL THEN
6270                                 au.alias
6271                         ELSE
6272                                 au.first_given_name
6273                         END AS usr_alias_or_first_given_name,
6274                         au.first_given_name AS usr_first_given_name,
6275                         au.second_given_name AS usr_second_given_name,
6276                         au.family_name AS usr_family_name,
6277                         au.prefix AS usr_prefix,
6278                         au.suffix AS usr_suffix,
6279                         au.alias AS usr_alias,
6280                         CASE WHEN au.alias IS NOT NULL THEN
6281                                 au.alias
6282                         ELSE
6283                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6284                                         COALESCE(au.family_name, ''),
6285                                         COALESCE(au.suffix, ''),
6286                                         ', ',
6287                                         COALESCE(au.prefix, ''),
6288                                         COALESCE(au.first_given_name, ''),
6289                                         COALESCE(au.second_given_name, '')
6290                                 ], ' '), E'\\s+,', ',')
6291                         END AS usr_alias_or_display_name,
6292                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6293                                 COALESCE(au.family_name, ''),
6294                                 COALESCE(au.suffix, ''),
6295                                 ', ',
6296                                 COALESCE(au.prefix, ''),
6297                                 COALESCE(au.first_given_name, ''),
6298                                 COALESCE(au.second_given_name, '')
6299                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6300                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6301                                 AS call_number_label,
6302                         siss.label AS issuance_label,
6303                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6304                         ahcm_1.copy_count AS potential_copies
6305                 FROM action.hold_request ahr
6306                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6307                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6308                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6309                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6310                 JOIN actor.usr au ON (au.id = ahr.usr)
6311                 JOIN (
6312                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6313                         FROM asset.copy_location
6314                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6315                 LEFT JOIN actor.usr_standing_penalty ausp 
6316                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6317                 LEFT JOIN config.standing_penalty csp
6318                         ON (
6319                                 csp.id = ausp.standing_penalty AND 
6320                                 csp.block_list LIKE '%CAPTURE%' AND (
6321                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6322                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6323                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6324                                         )
6325                                 )
6326                         )
6327                 JOIN (
6328                         SELECT COUNT(target_copy) AS copy_count, hold
6329                         FROM action.hold_copy_map
6330                         GROUP BY 2
6331                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6332                 LEFT JOIN serial.issuance siss
6333                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6334                 LEFT JOIN asset.copy_location_order acplo
6335                         ON (acp.location = acplo.location AND
6336                                 acp.circ_lib = acplo.org)
6337                 WHERE
6338                         ahr.capture_time IS NULL AND
6339                         ahr.cancel_time IS NULL AND
6340                         csp.id IS NULL AND
6341                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6342                         acp.status IN (0,7)
6343                 ]]></oils_persist:source_definition>
6344                 <fields oils_persist:primary="id">
6345                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6346                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6347                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6348                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6349                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6350                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6351                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6352                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6353                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6354                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6355                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6356                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6357                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6358                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6359                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6360                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6361                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6362                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6363                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6364                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6365                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6366                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6367                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6368                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6369                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6370                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6371                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6372                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6373                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6374                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6375                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6376                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6377                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6378                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6379                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6380                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6381                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6382                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6383                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6384                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6385                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6386                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6387                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6388                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6389                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6390                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6391                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6392                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6393                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6394                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6395                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6396                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6397                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6398                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
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="requestor" reltype="has_a" key="id" map="" class="au"/>
6407                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6408                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6409                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6410                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6411                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6412                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6413                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6414                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6415                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6416                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6417                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6418                 </links>
6419                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6420                         <actions>
6421                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6422                         </actions>
6423                 </permacrud>
6424         </class>
6425         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6426                 <oils_persist:source_definition>
6427                         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)
6428                 </oils_persist:source_definition>
6429                 <fields oils_persist:primary="id">
6430                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6431                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6432                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6433                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6434                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6435                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6436                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6437                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6438                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6439                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6440                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6441                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6442                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6443                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6444                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6445                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6446                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6447                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6448                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6449                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6450                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6451                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6452                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6453                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6454                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6455                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6456                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6457                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6458                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6459                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6460                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6461                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6462                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6463                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6464                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6465                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6466                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6467                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6468                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6469                 </fields>
6470                 <links>
6471                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6472                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6473                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6474                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6475                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6476                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6477                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6478                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6479                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6480                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6481                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6482                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6483                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6484                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6485                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6486                 </links>
6487         </class>
6488
6489         <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">
6490                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6491                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6492                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6493                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6494                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6495                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6496                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6497                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6498                 </fields>
6499                 <links>
6500                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6501                 </links>
6502                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6503                         <actions>
6504                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6505                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6506                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6507                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6508                         </actions>
6509                 </permacrud>
6510         </class>
6511         <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">
6512                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6513                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6514                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6515                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6516                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6517                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6518                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6519                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6520                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6521                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6522                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6523                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6524                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6525                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6526                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6527                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6528                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6529                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6530                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6531                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6532                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6533                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6534                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6535                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6536                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6537                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6538                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6539                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6540                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6541                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6542                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6543                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6544                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6545                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6546                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6547                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6548                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6549                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6550                 </fields>
6551                 <links>
6552                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6553                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6554                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6555                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6556                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6557                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6558                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6559                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6560                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6561                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6562                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6563                 </links>
6564                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6565                         <actions>
6566                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6567                         </actions>
6568                 </permacrud>
6569         </class>
6570         <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">
6571                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6572                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6573                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6574                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6575                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6576                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6577                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6578                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6579                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6580                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6581                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6582                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6583                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6584                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6585                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6586                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6587                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6588                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6589                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6590                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6591                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6592                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6593                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6594                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6595                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6596                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6597                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6598                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6599                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6600                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6601                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6602                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6603                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6604                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6605                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6606                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6607                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6608                 </fields>
6609                 <links>
6610                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6611                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6612                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6613                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6614                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6615                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6616                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6617                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6618                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6619                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6620                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6621                 </links>
6622                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6623                         <actions>
6624                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6625                         </actions>
6626                 </permacrud>
6627         </class>
6628
6629         <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">
6630                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6631                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6632                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6633                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6634                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6635                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6636                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6637                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6638                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6639                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6640                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6641                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6642                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6643                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6644                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6645                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6646                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6647                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6648                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6649                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6650                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6651                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6652                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6653                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6654                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6655                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6656                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6657                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6658                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6659                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6660                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6661                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6662                 </fields>
6663                 <links>
6664                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6665                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6666                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6667                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6668                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6669                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6670                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6671                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6672                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6673                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6674                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6675                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6676                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6677                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6678                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6679                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6680                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6681                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6682                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6683                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6684                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6685                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6686                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6687                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6688                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6689                 </links>
6690         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6691             <actions>
6692                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6693                 <retrieve />
6694                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6695                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6696             </actions>
6697         </permacrud>
6698         </class>
6699         <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">
6700                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6701                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6702                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6703                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6704                 </fields>
6705                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6706                         <actions>
6707                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6708                                 <retrieve/>
6709                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6710                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6711                         </actions>
6712                 </permacrud>
6713         </class>
6714         <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">
6715                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6716                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6717                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6718                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6719                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6720                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6721                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6722                 </fields>
6723                 <links>
6724                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6725                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6726                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6727                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6728                 </links>
6729                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6730                         <actions>
6731                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6732                                 <retrieve/>
6733                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6734                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6735                         </actions>
6736                 </permacrud>
6737         </class>
6738         <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">
6739                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6740                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6741                         <field name="btype" reporter:datatype="text"/>
6742                         <field name="id" reporter:datatype="id" />
6743                         <field name="name"  reporter:datatype="text"/>
6744                         <field name="description" reporter:datatype="text"/>
6745                         <field name="owner" reporter:datatype="link"/>
6746                         <field name="pub" reporter:datatype="bool"/>
6747                         <field name="create_time" reporter:datatype="timestamp" />
6748                         <field name="owning_lib" reporter:datatype="org_unit" />
6749                 </fields>
6750                 <links>
6751                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6752                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6753                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6754                 </links>
6755                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6756                         <actions>
6757                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6758                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6759                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6760                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6761                         </actions>
6762                 </permacrud>
6763         </class>
6764         <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">
6765                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6766                         <field name="id" reporter:datatype="id" />
6767                         <field name="bucket" reporter:datatype="link"/>
6768                         <field name="note" reporter:datatype="text" />
6769                 </fields>
6770                 <links>
6771                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6772                 </links>
6773         </class>
6774         <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">
6775                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6776                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6777                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6778                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6779                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6780                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6781                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6782                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6783                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6784                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6785                 </fields>
6786                 <links>
6787                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6788                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6789                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6790                 </links>
6791                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6792                         <actions>
6793                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6794                         </actions>
6795                 </permacrud>
6796         </class>
6797         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6798                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6799                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6800                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6801                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6802                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6803                 </fields>
6804                 <links>
6805                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6806                 </links>
6807                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6808                         <actions>
6809                                 <retrieve permission="VIEW_USER">
6810                                         <context link="usr" field="home_ou" />
6811                                 </retrieve>
6812                         </actions>
6813                 </permacrud>
6814         </class>
6815     <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">
6816         <fields oils_persist:primary="field">
6817             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6818             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6819             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6820         </fields>
6821         <links/>
6822         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6823             <actions>
6824                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6825                 <retrieve />
6826                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6827                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6828             </actions>
6829         </permacrud>
6830     </class>
6831         <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">
6832                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6833                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6834                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6835                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6836                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6837                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6838                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6839                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6840                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6841                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6842                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6843                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6844                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6845                 </fields>
6846                 <links>
6847                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6848                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6849                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6850                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6851                 </links>
6852         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6853             <actions>
6854                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6855                 <retrieve />
6856                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6857                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6858             </actions>
6859         </permacrud>
6860         </class>
6861         <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">
6862                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6863                         <field name="field" reporter:datatype="link"/>
6864                         <field name="id" reporter:datatype="id" />
6865                         <field name="source" reporter:datatype="link"/>
6866                         <field name="value"  reporter:datatype="text"/>
6867                 </fields>
6868                 <links>
6869                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6870                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6871                 </links>
6872         </class>
6873         <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">
6874                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6875                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6876                         <field name="btype" reporter:datatype="text"/>
6877                         <field name="id" reporter:datatype="id" />
6878                         <field name="name"  reporter:datatype="text"/>
6879                         <field name="description" reporter:datatype="text"/>
6880                         <field name="owner" reporter:datatype="link"/>
6881                         <field name="pub" reporter:datatype="bool"/>
6882                         <field name="create_time" reporter:datatype="timestamp" />
6883                         <field name="owning_lib" reporter:datatype="org_unit" />
6884                 </fields>
6885                 <links>
6886                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6887                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6888                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6889                 </links>
6890                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6891                         <actions>
6892                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6893                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6894                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6895                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6896                         </actions>
6897                 </permacrud>
6898         </class>
6899         <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">
6900                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6901                         <field name="id" reporter:datatype="id" />
6902                         <field name="bucket" reporter:datatype="link"/>
6903                         <field name="note" reporter:datatype="text" />
6904                 </fields>
6905                 <links>
6906                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6907                 </links>
6908         </class>
6909         <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">
6910                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6911                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6912                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6913                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6914                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6915                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6916                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6917                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6918                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6919                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6920                 </fields>
6921                 <links>
6922                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6923                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6924                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6925                 </links>
6926         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6927             <actions>
6928                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6929                     <context link="xact" jump="usr" field="home_ou"/>
6930                 </retrieve>
6931                         </actions>
6932                 </permacrud>
6933         </class>
6934         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6935                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6936                         <field name="id" reporter:datatype="id" />
6937                         <field name="ind1" />
6938                         <field name="ind2" />
6939                         <field name="record" />
6940                         <field name="subfield" />
6941                         <field name="tag" />
6942                         <field name="value" />
6943                 </fields>
6944                 <links>
6945                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6946                 </links>
6947         </class>
6948         <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">
6949                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6950                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6951                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6952                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6953                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6954                 </fields>
6955                 <links>
6956                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6957                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6958                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6959                 </links>
6960         </class>
6961         <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">
6962                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6963                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6964                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6965                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6966                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6967                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6968                 </fields>
6969                 <links>
6970                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6971                 </links>
6972         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6973             <actions>
6974                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6975                 <retrieve/>
6976                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6977                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6978             </actions>
6979         </permacrud>
6980
6981         </class>
6982         <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">
6983                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6984                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6985                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6986                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6987                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6988                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6989                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6990                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6991                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6992                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6993                 </fields>
6994                 <links>
6995                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6996                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6997                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6998                 </links>
6999         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7000             <actions>
7001                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
7002                 <retrieve/>
7003                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
7004                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
7005             </actions>
7006         </permacrud>
7007         </class>
7008         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
7009                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
7010                         <field name="create_date" reporter:datatype="timestamp"/>
7011                         <field name="creator" reporter:datatype="link"/>
7012                         <field name="edit_date" reporter:datatype="timestamp"/>
7013                         <field name="editor" reporter:datatype="link"/>
7014                         <field name="id" reporter:datatype="id" />
7015                         <field name="pub" reporter:datatype="bool"/>
7016                         <field name="record" reporter:datatype="link"/>
7017                         <field name="value"  reporter:datatype="text"/>
7018                 </fields>
7019                 <links>
7020                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7021                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7022                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7023                 </links>
7024         </class>
7025         <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">
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="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
7037                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7038                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
7039                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7040                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
7041                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7042                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
7043                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
7044                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7045                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7046                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7047                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7048                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7049                 </fields>
7050                 <links>
7051                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7052                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7053                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7054                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7055                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7056                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7057                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7058                 </links>
7059         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7060             <actions>
7061                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
7062             </actions>
7063         </permacrud>
7064         </class>
7065         <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">
7066                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
7067                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
7068                         <field name="quality" reporter:datatype="int" />
7069                         <field name="source" reporter:datatype="text"/>
7070                         <field name="transcendant" reporter:datatype="bool"/>
7071                         <field name="can_have_copies" reporter:datatype="bool"/>
7072                 </fields>
7073                 <links/>
7074         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7075             <actions>
7076                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
7077                 <retrieve/>
7078                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
7079                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
7080             </actions>
7081         </permacrud>
7082         </class>
7083         <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">
7084                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7085                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7086                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7087                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7088                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7089                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
7090                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
7091                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7092                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7093                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7094                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7095                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7096                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
7097                 </fields>
7098                 <links>
7099                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
7100                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7101                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7102                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7103                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7104                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7105                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7106                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
7107                 </links>
7108                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7109                         <actions>
7110                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7111                                         <context link="usr" field="home_ou" />
7112                                 </retrieve>
7113                         </actions>
7114                 </permacrud>
7115         </class>
7116         <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">
7117                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
7118                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7119                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7120                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7121                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7122                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7123                 </fields>
7124                 <links>
7125                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7126                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7127                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
7128                 </links>
7129         </class>
7130         <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">
7131                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
7132                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
7133                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
7134                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7135                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
7136                 </fields>
7137                 <links>
7138                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7139                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7140                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
7141                 </links>
7142         </class>
7143         <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">
7144                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
7145                         <field name="bucket" reporter:datatype="link"/>
7146                         <field name="id" reporter:datatype="id" />
7147                         <field name="target_user" reporter:datatype="link"/>
7148                         <field name="create_time" reporter:datatype="timestamp" />
7149                         <field name="pos" reporter:datatype="int" />
7150                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7151                 </fields>
7152                 <links>
7153                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7154                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7155             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7156                 </links>
7157                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7158                         <actions>
7159                                 <retrieve permission="ADMIN_USER_BUCKET">
7160                     <context link="bucket" owning_lib="owning_lib"/>
7161                 </retrieve>
7162             </actions>
7163         </permacrud>
7164         </class>
7165         <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">
7166                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7167                         <field name="id" reporter:datatype="id" />
7168                         <field name="item" reporter:datatype="link"/>
7169                         <field name="note" reporter:datatype="text" />
7170                 </fields>
7171                 <links>
7172                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7173                 </links>
7174         </class>
7175         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7176                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7177                         <field name="balance_owed" reporter:datatype="money" />
7178                         <field name="total_owed" reporter:datatype="money" />
7179                         <field name="total_paid" reporter:datatype="money" />
7180                         <field name="usr" reporter:datatype="link"/>
7181                 </fields>
7182                 <links>
7183                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7184                 </links>
7185         </class>
7186         <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">
7187                 <fields oils_persist:primary="code" oils_persist:sequence="">
7188                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7189                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7190                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7191                 </fields>
7192                 <links/>
7193         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7194             <actions>
7195                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7196                 <retrieve/>
7197                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7198                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7199             </actions>
7200         </permacrud>
7201         </class>
7202         <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">
7203                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7204                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7205                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7206                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7207                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7208                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7209                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7210                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7211                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7212                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7213                 </fields>
7214                 <links>
7215                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7216                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7217                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7218                 </links>
7219         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7220             <actions>
7221                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7222                     <context link="xact" jump="usr" field="home_ou"/>
7223                 </retrieve>
7224                         </actions>
7225                 </permacrud>
7226         </class>
7227         <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">
7228                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7229                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7230                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7231                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7232                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7233                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7234                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7235                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7236                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7237                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7238                 </fields>
7239                 <links>
7240                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7241                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7242                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7243                 </links>
7244         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7245             <actions>
7246                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7247                     <context link="xact" jump="usr" field="home_ou"/>
7248                 </retrieve>
7249                         </actions>
7250                 </permacrud>
7251         </class>
7252         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7253                 <fields oils_persist:primary="id" oils_persist:sequence="">
7254                         <field name="checkin_lib" reporter:datatype="link"/>
7255                         <field name="checkin_staff" reporter:datatype="link"/>
7256                         <field name="checkin_time" reporter:datatype="timestamp"/>
7257                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7258                         <field name="circ_staff" reporter:datatype="link"/>
7259                         <field name="desk_renewal" reporter:datatype="bool"/>
7260                         <field name="due_date" reporter:datatype="timestamp"/>
7261                         <field name="duration" reporter:datatype="interval"/>
7262                         <field name="duration_rule" reporter:datatype="link"/>
7263                         <field name="fine_interval" reporter:datatype="interval"/>
7264                         <field name="id" reporter:datatype="id" />
7265                         <field name="max_fine" reporter:datatype="money" />
7266                         <field name="max_fine_rule" reporter:datatype="link"/>
7267                         <field name="opac_renewal" reporter:datatype="bool"/>
7268                         <field name="phone_renewal" reporter:datatype="bool"/>
7269                         <field name="recurring_fine" reporter:datatype="money" />
7270                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7271                         <field name="renewal_remaining" reporter:datatype="int" />
7272             <field name="grace_period" reporter:datatype="interval" />
7273                         <field name="stop_fines" reporter:datatype="text"/>
7274                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7275                         <field name="target_copy" reporter:datatype="link"/>
7276                         <field name="usr" reporter:datatype="link"/>
7277                         <field name="xact_finish" reporter:datatype="timestamp" />
7278                         <field name="xact_start" reporter:datatype="timestamp" />
7279                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7280                 </fields>
7281                 <links>
7282                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7283                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7284                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7285                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7286                 </links>
7287         </class>
7288         <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">
7289                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7290                         <field name="field" reporter:datatype="link"/>
7291                         <field name="id" reporter:datatype="id" />
7292                         <field name="source" reporter:datatype="link"/>
7293                         <field name="value" reporter:datatype="text"/>
7294                 </fields>
7295                 <links>
7296                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7297                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7298                 </links>
7299         </class>
7300         <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">
7301                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7302                         <field name="high" reporter:datatype="money" />
7303                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7304                         <field name="low" reporter:datatype="money" />
7305                         <field name="name" reporter:datatype="text"/>
7306                         <field name="normal" reporter:datatype="money" />
7307                         <field name="recurrence_interval" reporter:datatype="interval"/>
7308             <field name="grace_period" reporter:datatype="interval" />
7309                 </fields>
7310                 <links/>
7311         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7312             <actions>
7313                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7314                 <retrieve/>
7315                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7316                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7317             </actions>
7318         </permacrud>
7319         </class>
7320         <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">
7321                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7322                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7323                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7324                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7325                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7326                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7327                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7328                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7329                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7330                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7331                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7332                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7333                 </fields>
7334                 <links>
7335                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7336                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7337                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7338                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7339                 </links>
7340         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7341             <actions>
7342                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7343                     <context link="xact" jump="usr" field="home_ou"/>
7344                 </retrieve>
7345                         </actions>
7346                 </permacrud>
7347         </class>
7348         <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">
7349                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7350                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7351                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7352                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7353                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7354                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="link"/>
7355                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7356                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7357                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7358                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7359                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7360                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7361                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7362                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7363                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7364                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7365                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7366                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7367                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7368                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7369                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7370                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7371                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7372                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
7373                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7374                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7375                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7376                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7377                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7378                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7379                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7380                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7381                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7382                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7383                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7384                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7385                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7386                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7387                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7388                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7389                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7390                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7391                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7392                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7393                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7394                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7395                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7396                         <field reporter:label="Latest Inventory" name="last_copy_inventory" oils_persist:virtual="true" reporter:datatype="link"/>
7397                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7398                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7399                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
7400                 </fields>
7401                 <links>
7402                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7403                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7404                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7405                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7406                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7407                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7408                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7409                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7410                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7411                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7412                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7413                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7414                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7415                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7416                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7417                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7418                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7419                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7420                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7421                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7422                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7423                         <link field="last_copy_inventory" reltype="might_have" key="copy" map="" class="alci"/>
7424                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7425                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7426                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7427                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
7428                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7429                 </links>
7430         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7431             <actions>
7432                 <create permission="CREATE_COPY">
7433                     <context link="call_number" field="owning_lib"/>
7434                 </create>
7435                 <retrieve/>
7436                 <update permission="UPDATE_COPY">
7437                     <context link="call_number" field="owning_lib"/>
7438                 </update>
7439                 <delete permission="DELETE_COPY">
7440                     <context link="call_number" field="owning_lib"/>
7441                 </delete>
7442             </actions>
7443         </permacrud>
7444         </class>
7445
7446         <class id="alci" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::last_copy_inventory" oils_persist:tablename="asset.last_copy_inventory" reporter:core="true" reporter:label="Latest Inventory">
7447                 <fields oils_persist:primary="id" oils_persist:sequence="asset.last_copy_inventory_id_seq">
7448             <field reporter:label="Last Inventory ID" name="id" reporter:datatype="id"/>
7449                         <field reporter:label="Last Inventory Date" name="inventory_date" reporter:datatype="timestamp"/>
7450                         <field reporter:label="Last Inventory Workstation" name="inventory_workstation" reporter:datatype="link"/>
7451                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
7452                 </fields>
7453                 <links>
7454                         <link field="inventory_workstation" reltype="has_a" key="id" map="" class="aws"/>
7455                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7456                 </links>
7457         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7458             <actions>
7459                                 <create/>
7460                                 <retrieve/>
7461                                 <update/>
7462                                 <delete/>
7463             </actions>
7464         </permacrud>
7465         </class>
7466
7467         <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">
7468                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
7469                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
7470                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
7471                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7472                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7473                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7474                         <field reporter:label="Event" name="event" reporter:datatype="text" />
7475                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
7476                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
7477                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
7478                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
7479                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
7480                 </fields>
7481                 <links>
7482                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
7483                 </links>
7484         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7485             <actions>
7486                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7487                 <retrieve/>
7488                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7489                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
7490             </actions>
7491         </permacrud>
7492         </class>
7493
7494         <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">
7495                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
7496                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7497                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
7498                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7499                 </fields>
7500                 <links>
7501                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7502                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7503                 </links>
7504         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7505             <actions>
7506                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7507                 <retrieve/>
7508                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7509                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
7510             </actions>
7511         </permacrud>
7512         </class>
7513
7514         <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">
7515                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
7516                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7517                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7518                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7519                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7520                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7521                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7522                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7523                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7524                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7525                 </fields>
7526                 <links>
7527                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7528                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7529                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7530                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7531                 </links>
7532         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7533             <actions>
7534                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT" global_required="true"/>
7535                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT" global_required="true"/>
7536                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT" global_required="true"/>
7537                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT" global_required="true"/>
7538             </actions>
7539         </permacrud>
7540         </class>
7541
7542         <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">
7543                 <fields oils_persist:primary="id">
7544                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7545                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7546                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7547                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7548                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7549                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7550                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7551                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7552                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7553                 </fields>
7554                 <links>
7555                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7556                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7557                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7558                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7559                 </links>
7560         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7561             <actions>
7562                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT" global_required="true"/>
7563                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT" global_required="true"/>
7564                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT" global_required="true"/>
7565                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT" global_required="true"/>
7566             </actions>
7567         </permacrud>
7568         </class>
7569
7570         <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">
7571                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
7572                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
7573                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
7574                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7575                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7576                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7577                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7578                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7579                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
7580                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
7581                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7582                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7583                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7584                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
7585                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
7586                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
7587                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
7588                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
7589                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
7590                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
7591                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
7592                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
7593                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7594                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7595                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7596                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7597                 </fields>
7598                 <links>
7599                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7600                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7601                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7602                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7603                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7604                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7605                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7606                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7607                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7608                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7609                 </links>
7610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7611                         <actions>
7612                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7613                                 <retrieve />
7614                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7615                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7616                         </actions>
7617                 </permacrud>
7618         </class>
7619
7620         <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">
7621                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7622                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7623                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7624                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7625                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7626                 </fields>
7627                 <links/>
7628         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7629             <actions>
7630                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7631                 <retrieve/>
7632                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7633                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7634             </actions>
7635         </permacrud>
7636         </class>
7637         <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">
7638                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7639                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7640                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7641                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7642                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7643                 </fields>
7644                 <links/>
7645         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7646             <actions>
7647                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7648                 <retrieve/>
7649                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7650                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7651             </actions>
7652         </permacrud>
7653         </class>
7654         <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">
7655                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7656                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7657                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7658                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7659                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7660                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7661                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7662                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7663                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7664                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7665                 </fields>
7666                 <links>
7667                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7668                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7669                 </links>
7670         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7671             <actions>
7672                 <create permission="CREATE_PERM" global_required="true"/>
7673                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7674                 <update permission="UPDATE_PERM" global_required="true"/>
7675                 <delete permission="DELETE_PERM" global_required="true"/>
7676             </actions>
7677         </permacrud>
7678         </class>
7679         <class id="pgtde" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_tree_display_entry" oils_persist:tablename="permission.grp_tree_display_entry" reporter:label="Permission Group Tree Display Entry">
7680                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_display_entry_id_seq">
7681                         <field reporter:label="Entry ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7682                         <field reporter:label="Group ID" name="grp" reporter:datatype="link" oils_persist:i18n="true"/>
7683                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7684                         <field reporter:label="Org Unit" name="org" reporter:datatype="link"/>
7685                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7686                         <field reporter:label="Child Entries" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7687                 </fields>
7688                 <links>
7689                         <link field="parent" reltype="has_a" key="id" map="" class="pgtde"/>
7690                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7691                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7692                         <link field="children" reltype="has_many" key="parent" map="" class="pgtde"/>
7693                 </links>
7694                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7695                         <actions>
7696                                 <create permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7697                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7698                                 <update permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7699                                 <delete permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7700                         </actions>
7701                 </permacrud>
7702         </class>
7703         <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">
7704                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7705                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7706                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7707                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7708                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7709                 </fields>
7710                 <links>
7711                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7712                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7713                 </links>
7714         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7715             <actions>
7716                 <create permission="ADMIN_SURVEY">
7717                     <context link="question" jump="survey" field="owner"/>
7718                 </create>
7719                 <retrieve/>
7720                 <update permission="ADMIN_SURVEY">
7721                     <context link="question" jump="survey" field="owner"/>
7722                 </update>
7723                 <delete permission="ADMIN_SURVEY">
7724                     <context link="question" jump="survey" field="owner"/>
7725                 </delete>
7726             </actions>
7727         </permacrud>
7728         </class>
7729         <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">
7730                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7731                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7732                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7733                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7734                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7735                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7736                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7737                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7738                 </fields>
7739                 <links>
7740                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7741                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7742                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7743                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7744                 </links>
7745                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7746                         <actions>
7747                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7748                         </actions>
7749                 </permacrud>
7750         </class>
7751         <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">
7752                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7753                         <field name="balance_owed" reporter:datatype="money" />
7754                         <field name="total_owed" reporter:datatype="money" />
7755                         <field name="total_paid" reporter:datatype="money" />
7756                         <field name="usr" reporter:datatype="link"/>
7757                 </fields>
7758                 <links>
7759                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7760                 </links>
7761         </class>
7762         <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">
7763                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7764                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7765                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7766                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7767                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7768                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7769                 </fields>
7770                 <links>
7771                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7772                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7773                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7774                 </links>
7775         </class>
7776         <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">
7777                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7778                         <field name="field" reporter:datatype="link"/>
7779                         <field name="id" reporter:datatype="id" />
7780                         <field name="source" reporter:datatype="link"/>
7781                         <field name="value" reporter:datatype="text"/>
7782                 </fields>
7783                 <links>
7784                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7785                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7786                 </links>
7787         </class>
7788         <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">
7789                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7790                         <field name="field" reporter:datatype="link"/>
7791                         <field name="id" reporter:datatype="id" />
7792                         <field name="source" reporter:datatype="link"/>
7793                         <field name="value" reporter:datatype="text"/>
7794                 </fields>
7795                 <links>
7796                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7797                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7798                 </links>
7799         </class>
7800         <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">
7801                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7802                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7803                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7804                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7805                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7806                 </fields>
7807                 <links>
7808                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7809                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7810                 </links>
7811         </class>
7812         <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">
7813                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7814                         <field name="depth" reporter:datatype="int" />
7815                         <field name="grantable" reporter:datatype="bool"/>
7816                         <field name="grp" reporter:datatype="link"/>
7817                         <field name="id" reporter:datatype="id" />
7818                         <field name="perm" reporter:datatype="link"/>
7819                 </fields>
7820                 <links>
7821                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7822                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7823                 </links>
7824         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7825             <actions>
7826                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7827                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7828                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7829                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7830             </actions>
7831         </permacrud>
7832         </class>
7833         <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">
7834                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7835                         <field name="items" oils_persist:virtual="true" />
7836                         <field name="btype" reporter:datatype="text"/>
7837                         <field name="id" reporter:datatype="id" />
7838                         <field name="name" reporter:datatype="text"/>
7839                         <field name="description" reporter:datatype="text"/>
7840                         <field name="owner" reporter:datatype="link"/>
7841                         <field name="pub" reporter:datatype="bool"/>
7842                         <field name="create_time" reporter:datatype="timestamp" />
7843                         <field name="owning_lib" reporter:datatype="org_unit" />
7844                 </fields>
7845                 <links>
7846                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7847                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7848                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7849                 </links>
7850                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7851                         <actions>
7852                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7853                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7854                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7855                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7856                         </actions>
7857                 </permacrud>
7858         </class>
7859         <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">
7860                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7861                         <field name="id" reporter:datatype="id" />
7862                         <field name="bucket" reporter:datatype="link"/>
7863                         <field name="note" reporter:datatype="text" />
7864                 </fields>
7865                 <links>
7866                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7867                 </links>
7868         </class>
7869         <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">
7870                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7871                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
7872                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7873                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
7874                 </fields>
7875                 <links>
7876                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7877                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7878                 </links>
7879         </class>
7880         <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">
7881                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7882                         <field name="depth" reporter:datatype="int"/>
7883                         <field name="grantable" reporter:datatype="bool"/>
7884                         <field name="id" reporter:datatype="id" />
7885                         <field name="perm" reporter:datatype="link"/>
7886                         <field name="usr" reporter:datatype="link"/>
7887                 </fields>
7888                 <links>
7889                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7890                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7891                 </links>
7892         </class>
7893         <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">
7894                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7895                         <field name="object_id" reporter:datatype="text"/>
7896                         <field name="grantable" reporter:datatype="bool"/>
7897                         <field name="id" reporter:datatype="id" />
7898                         <field name="perm" reporter:datatype="link"/>
7899                         <field name="usr" reporter:datatype="link"/>
7900                         <field name="object_type" reporter:datatype="text"/>
7901                 </fields>
7902                 <links>
7903                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7904                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7905                 </links>
7906         </class>
7907         <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">
7908                 <fields oils_persist:primary="id" oils_persist:sequence="">
7909                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7910                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7911                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7912                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7913                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7914                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7915                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7916                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7917                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7918                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7919                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7920                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7921                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7922                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7923                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7924                 </fields>
7925                 <links>
7926                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7927                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7928                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7929                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7930                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7931                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7932                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7933                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7934                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7935                 </links>
7936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7937             <actions>
7938                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7939                     <context link="xact" jump="usr" field="home_ou"/>
7940                 </retrieve>
7941                         </actions>
7942                 </permacrud>
7943         </class>
7944         <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">
7945                 <fields oils_persist:primary="id" oils_persist:sequence="">
7946                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7947                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7948                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7949                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7950                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7951                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7952                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7953                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7954                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7955                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7956                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7957                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7958                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7959                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7960                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7961                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7962                 </fields>
7963                 <links>
7964                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7965                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7966                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7967                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7968                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7969                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7970                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7971                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7972                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7973                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7974                 </links>
7975                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7976                         <actions>
7977                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7978                                         <context link="xact" jump="usr" field="home_ou"/>
7979                                 </retrieve>
7980                         </actions>
7981                 </permacrud>
7982         </class>
7983         <class id="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">
7984                 <fields oils_persist:primary="id" oils_persist:sequence="">
7985                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7986                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7987                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7988                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7989                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7990                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7991                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7992                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7993                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7994                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7995                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7996                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7997                 </fields>
7998                 <links>
7999                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8000                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8001                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8002                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8003                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8004                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8005                 </links>
8006         </class>
8007         <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">
8008                 <fields oils_persist:primary="id" oils_persist:sequence="">
8009                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8010                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8011                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8012                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8013                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8014                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8015                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8016                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8017                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8018                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8019                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8020                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8021                 </fields>
8022                 <links>
8023                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8024                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8025                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8026                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8027                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8028                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8029                 </links>
8030         </class>
8031         <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">
8032                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
8033                         <field name="bucket" reporter:datatype="link"/>
8034                         <field name="id" reporter:datatype="id" />
8035                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
8036                         <field name="create_time" reporter:datatype="timestamp" />
8037                         <field name="pos" reporter:datatype="int" />
8038                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8039                 </fields>
8040                 <links>
8041                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
8042                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
8043             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
8044                 </links>
8045                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8046                         <actions>
8047                                 <retrieve permission="ADMIN_COPY_BUCKET">
8048                     <context link="bucket" owning_lib="owning_lib"/>
8049                 </retrieve>
8050             </actions>
8051         </permacrud>
8052         </class>
8053         <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">
8054                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
8055                         <field name="id" reporter:datatype="id" />
8056                         <field name="item" reporter:datatype="link"/>
8057                         <field name="note" reporter:datatype="text" />
8058                 </fields>
8059                 <links>
8060                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
8061                 </links>
8062         </class>
8063         <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">
8064                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
8065                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
8066                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8067                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
8068                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
8069                 </fields>
8070                 <links>
8071                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
8072                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8073                 </links>
8074                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8075                         <actions>
8076                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8077                         </actions>
8078                 </permacrud>
8079         </class>
8080     <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">
8081         <fields oils_persist:primary="field">
8082             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
8083             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
8084             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
8085         </fields>
8086         <links/>
8087         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8088             <actions>
8089                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
8090                 <retrieve />
8091                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
8092                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
8093             </actions>
8094         </permacrud>
8095     </class>
8096         <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">
8097                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
8098                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
8099                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8100                 </fields>
8101                 <links/>
8102         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8103             <actions>
8104                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8105                 <retrieve/>
8106                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8107                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8108             </actions>
8109         </permacrud>
8110         </class>
8111
8112
8113         <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">
8114                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8115                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8116                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8117                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8118                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
8119                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8120                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8121                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8122                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8123                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8124                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8125                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8126                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8127                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8128                 </fields>
8129                 <links>
8130                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8131                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
8132                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8133                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8134                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8135                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8136                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
8137                 </links>
8138         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8139             <actions>
8140                 <create permission="TRANSIT_COPY">
8141                     <context link="target_copy" field="owner"/>
8142                 </create>
8143                 <retrieve/>
8144                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8145                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8146             </actions>
8147         </permacrud>
8148         </class>
8149         <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">
8150                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8151                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8152                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8153                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8154                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
8155                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8156                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8157                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8158                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8159                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8160                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8161                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8162                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8163                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8164                 </fields>
8165                 <links>
8166                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8167                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8168                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8169                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8170                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8171                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8172                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8173                 </links>
8174         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8175             <actions>
8176                 <create permission="TRANSIT_COPY" context_field="owner">
8177                     <context link="target_copy" field="circ_lib"/>
8178                 </create>
8179                 <retrieve/>
8180                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8181                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8182             </actions>
8183         </permacrud>
8184         </class>
8185         <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">
8186                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8187                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8188                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8189                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8190                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8191                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8192                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8193                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8194                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8195                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8196                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8197                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8198                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8199                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8200                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8201                 </fields>
8202                 <links>
8203                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8204                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8205                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8206                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8207                 </links>
8208         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8209             <actions>
8210                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8211                     <context link="xact" jump="usr" field="home_ou"/>
8212                 </retrieve>
8213                         </actions>
8214                 </permacrud>
8215         </class>
8216         <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">
8217                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8218                         <field name="grp" />
8219                         <field name="id" reporter:datatype="id" />
8220                         <field name="usr" />
8221                 </fields>
8222                 <links>
8223                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8224                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8225                 </links>
8226         </class>
8227         <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">
8228                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8229                         <field name="id" reporter:datatype="id" />
8230                         <field name="fq_field" reporter:datatype="text"/>
8231                         <field name="identity_value" reporter:datatype="text"/>
8232                         <field name="translation" reporter:datatype="text"/>
8233                         <field name="string" reporter:datatype="text"/>
8234                 </fields>
8235                 <links>
8236                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
8237                 </links>
8238         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8239             <actions>
8240                 <create permission="CREATE_TRANSLATION" global_required="true"/>
8241                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
8242                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
8243                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
8244             </actions>
8245         </permacrud>
8246         </class>
8247         <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">
8248                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
8249                         <field name="id" reporter:datatype="id" />
8250                         <field name="fm_class" reporter:datatype="text"/>
8251                         <field name="field" reporter:datatype="text"/>
8252                         <field name="owner" reporter:datatype="org_unit"/>
8253                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
8254                 </fields>
8255                 <links>
8256                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8257                 </links>
8258         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8259             <actions>
8260                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8261                 <retrieve/>
8262                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8263                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8264             </actions>
8265         </permacrud>
8266         </class>
8267         <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">
8268                 <fields oils_persist:primary="code">
8269                         <field name="code" reporter:datatype="id" />
8270                         <field name="marc_code" reporter:datatype="text"/>
8271                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8272                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8273                         <field name="rtl" reporter:datatype="bool"/>
8274                 </fields>
8275                 <links/>
8276         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8277             <actions>
8278                 <create permission="CREATE_LOCALE" global_required="true"/>
8279                 <retrieve/>
8280                 <update permission="UPDATE_LOCALE" global_required="true"/>
8281                 <delete permission="DELETE_LOCALE" global_required="true"/>
8282             </actions>
8283         </permacrud>
8284         </class>
8285         <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">
8286                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
8287                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
8288                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
8289                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
8290             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
8291                 </fields>
8292                 <links>
8293                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8294                 </links>
8295         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8296             <actions>
8297                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
8298                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
8299                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
8300                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
8301             </actions>
8302         </permacrud>
8303         </class>
8304
8305         <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">
8306                 <fields oils_persist:primary="id">
8307                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8308                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8309                 </fields>
8310                 <links/>
8311         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8312             <actions>
8313                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8314                 <retrieve/>
8315                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8316                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8317             </actions>
8318         </permacrud>
8319         </class>
8320
8321         <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">
8322                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
8323                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8324                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8325                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8326                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8327                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8328                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8329                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8330                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8331                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8332                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8333                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8334                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8335                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8336                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8337                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8338                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8339                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8340                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8341                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8342                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8343                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8344                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8345                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8346                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8347                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8348                 </fields>
8349                 <links>
8350                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8351                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8352                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8353                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8354                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8355                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8356                 </links>
8357         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8358             <actions>
8359                 <create permission="user_request.create">
8360                     <context link="usr" field="home_ou"/>
8361                                 </create>
8362                 <retrieve permission="user_request.view">
8363                     <context link="usr" field="home_ou"/>
8364                                 </retrieve>
8365                 <update permission="user_request.update">
8366                     <context link="usr" field="home_ou"/>
8367                                 </update>
8368                 <delete permission="user_request.delete">
8369                     <context link="usr" field="home_ou"/>
8370                                 </delete>
8371             </actions>
8372         </permacrud>
8373         </class>
8374
8375         <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">
8376                 <fields oils_persist:primary="code">
8377                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
8378                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8379                 </fields>
8380                 <links/>
8381         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8382             <actions>
8383                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8384                 <retrieve/>
8385                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8386                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8387             </actions>
8388         </permacrud>
8389         </class>
8390
8391         <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">
8392                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
8393                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
8394                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
8395                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
8396                         <field reporter:label="Ratio" name="ratio" />
8397                 </fields>
8398                 <links>
8399                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
8400                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
8401                 </links>
8402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8403                         <actions>
8404                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8405                                 <retrieve/>
8406                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8407                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8408                         </actions>
8409                 </permacrud>
8410         </class>
8411
8412         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
8413                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
8414                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8415                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8416                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8417                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8418                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8419                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
8420                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
8421                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
8422                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
8423                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8424                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8425                         <field reporter:label="URL" name="url" reporter:datatype="text" />
8426                         <field reporter:label="Email" name="email" reporter:datatype="text" />
8427                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
8428                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
8429                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
8430                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
8431                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
8432                 </fields>
8433                 <links>
8434                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8435                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8436             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
8437             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
8438                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
8439                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
8440                 </links>
8441         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8442             <actions>
8443                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
8444                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
8445                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
8446                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
8447             </actions>
8448         </permacrud>
8449         </class>
8450
8451         <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">
8452                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
8453                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8454                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8455                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8456                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8457                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8458                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8459                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8460                 </fields>
8461                 <links>
8462                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8463                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8464                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8465                 </links>
8466         </class>
8467
8468         <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">
8469                 <fields oils_persist:primary="code">
8470                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
8471                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8472                 </fields>
8473                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8474             <actions>
8475                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8476                 <retrieve/>
8477                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8478                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8479             </actions>
8480                 </permacrud>
8481         </class>
8482
8483         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
8484                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
8485                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
8486                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
8487                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8488                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
8489                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
8490                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
8491                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
8492                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
8493                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
8494                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
8495                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8496                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
8497                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
8498                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
8499                 </fields>
8500                 <links>
8501                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
8502                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8503                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
8504                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
8505                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
8506                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
8507                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
8508                 </links>
8509         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8510             <actions>
8511                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
8512                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
8513                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
8514                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
8515             </actions>
8516         </permacrud>
8517         </class>
8518
8519         <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">
8520                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
8521                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8522                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8523                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8524                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
8525                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
8526                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
8527                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8528                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
8529                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8530                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8531                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8532                 </fields>
8533                 <links>
8534                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8535                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8536                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8537                 </links>
8538         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8539             <actions>
8540                 <create   permission="ADMIN_INVOICE">
8541                                         <context link="invoice" field="receiver"/>
8542                                 </create>
8543                 <retrieve permission="ADMIN_INVOICE">
8544                                         <context link="invoice" field="receiver"/>
8545                                 </retrieve>
8546                 <update   permission="ADMIN_INVOICE">
8547                                         <context link="invoice" field="receiver"/>
8548                                 </update>
8549                                 <delete   permission="ADMIN_INVOICE">
8550                                         <context link="invoice" field="receiver"/>
8551                                 </delete>
8552             </actions>
8553         </permacrud>
8554         </class>
8555
8556         <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">
8557                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
8558                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8559                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8560                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8561                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8562                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
8563                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
8564                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8565                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8566                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8567                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8568                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8569                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8570                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
8571                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8572                 </fields>
8573                 <links>
8574                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8575                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8576                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8577                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8578                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8579                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
8580                 </links>
8581         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8582             <actions>
8583                 <create   permission="ADMIN_INVOICE">
8584                                         <context link="invoice" field="receiver"/>
8585                                 </create>
8586                 <retrieve permission="ADMIN_INVOICE">
8587                                         <context link="invoice" field="receiver"/>
8588                                 </retrieve>
8589                 <update   permission="ADMIN_INVOICE">
8590                                         <context link="invoice" field="receiver"/>
8591                                 </update>
8592                                 <delete   permission="ADMIN_INVOICE">
8593                                         <context link="invoice" field="receiver"/>
8594                                 </delete>
8595             </actions>
8596         </permacrud>
8597         </class>
8598
8599         <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">
8600                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
8601                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
8602                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8603                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8604                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8605                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8606                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8607                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
8608                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8609                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
8610                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
8611                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
8612                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8613                 </fields>
8614                 <links>
8615                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8616                 </links>
8617         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8618             <actions>
8619                 <create permission="ADMIN_PROVIDER">
8620                     <context link="provider" field="owner"/>
8621                 </create>
8622                 <retrieve permission="ADMIN_PROVIDER">
8623                     <context link="provider" field="owner"/>
8624                 </retrieve>
8625                 <update permission="ADMIN_PROVIDER">
8626                     <context link="provider" field="owner"/>
8627                 </update>
8628                 <delete permission="ADMIN_PROVIDER">
8629                     <context link="provider" field="owner"/>
8630                 </delete>
8631             </actions>
8632         </permacrud>
8633         </class>
8634
8635         <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">
8636                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
8637                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8638                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8639                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8640                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
8641                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
8642                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
8643         </fields>
8644                 <links>
8645                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8646                 </links>
8647         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8648             <actions>
8649                 <create permission="ADMIN_PROVIDER">
8650                     <context link="provider" field="owner"/>
8651                 </create>
8652                 <retrieve permission="ADMIN_PROVIDER">
8653                     <context link="provider" field="owner"/>
8654                 </retrieve>
8655                 <update permission="ADMIN_PROVIDER">
8656                     <context link="provider" field="owner"/>
8657                 </update>
8658                 <delete permission="ADMIN_PROVIDER">
8659                     <context link="provider" field="owner"/>
8660                 </delete>
8661             </actions>
8662         </permacrud>
8663     </class>
8664         <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">
8665                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
8666                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
8667                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8668                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8669                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8670                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
8671                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8672                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8673                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
8674                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
8675                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
8676                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
8677                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8678                 </fields>
8679                 <links>
8680                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
8681                 </links>
8682         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8683             <actions>
8684                 <create permission="ADMIN_PROVIDER">
8685                     <context link="contact" jump='provider' field="owner"/>
8686                 </create>
8687                 <retrieve permission="ADMIN_PROVIDER">
8688                     <context link="contact" jump='provider' field="owner"/>
8689                 </retrieve>
8690                 <update permission="ADMIN_PROVIDER">
8691                     <context link="contact" jump='provider' field="owner"/>
8692                 </update>
8693                 <delete permission="ADMIN_PROVIDER">
8694                     <context link="contact" jump='provider' field="owner"/>
8695                 </delete>
8696             </actions>
8697         </permacrud>
8698         </class>
8699
8700         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
8701                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
8702                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
8703                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
8704                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
8705                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
8706                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
8707                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
8708                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
8709                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8710                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
8711                 </fields>
8712                 <links>
8713                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
8714                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
8715                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
8716                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8717                 </links>
8718         </class>
8719
8720         <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">
8721                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
8722                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8723                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
8724                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
8725                 </fields>
8726                 <links>
8727             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
8728                 </links>
8729                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8730                         <actions>
8731                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8732                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8733                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8734                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8735                         </actions>
8736                 </permacrud>
8737         </class>
8738
8739         <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">
8740                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
8741                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
8742                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
8743                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
8744                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
8745                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
8746                 </fields>
8747                 <links>
8748                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
8749                 </links>
8750                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8751                         <actions>
8752                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8753                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8754                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8755                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8756                         </actions>
8757                 </permacrud>
8758         </class>
8759
8760         <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">
8761                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
8762                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8763                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8764                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8765                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8766                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8767                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8768                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8769                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
8770                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
8771                 </fields>
8772                 <links>
8773                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8774                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8775             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
8776             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
8777                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
8778                 </links>
8779         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8780             <actions>
8781                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8782                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
8783                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8784                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8785             </actions>
8786         </permacrud>
8787         </class>
8788
8789         <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">
8790                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8791                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8792                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8793                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8794                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8795                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8796                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8797                 </fields>
8798                 <links>
8799                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8800                 </links>
8801                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8802                         <actions>
8803                                 <create permission="ADMIN_FUNDING_SOURCE">
8804                     <context link="funding_source" field="owner"/>
8805                 </create>
8806                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8807                     <context link="funding_source" field="owner"/>
8808                 </retrieve>
8809                                 <update permission="ADMIN_FUNDING_SOURCE">
8810                     <context link="funding_source" field="owner"/>
8811                 </update>
8812                                 <delete permission="ADMIN_FUNDING_SOURCE">
8813                     <context link="funding_source" field="owner"/>
8814                 </delete>
8815                         </actions>
8816                 </permacrud>
8817         </class>
8818
8819         <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">
8820                 <fields oils_persist:primary="id">
8821                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8822                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8823                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8824                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8825                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8826                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8827                 </fields>
8828                 <links>
8829                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8830                 </links>
8831         </class>
8832
8833         <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">
8834                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8835                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8836                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8837                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8838                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8839                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8840                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
8841                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
8842                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8843                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
8844                 </fields>
8845                 <links>
8846                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8847                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8848                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
8849                 </links>
8850                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8851                         <actions>
8852                                 <create permission="ADMIN_ACQ_FUND">
8853                     <context link="fund" field="org"/>
8854                 </create>
8855                                 <retrieve permission="ADMIN_ACQ_FUND">
8856                     <context link="fund" field="org"/>
8857                 </retrieve>
8858                                 <update permission="ADMIN_ACQ_FUND">
8859                     <context link="fund" field="org"/>
8860                 </update>
8861                                 <delete permission="ADMIN_ACQ_FUND">
8862                     <context link="fund" field="org"/>
8863                 </delete>
8864                         </actions>
8865                 </permacrud>
8866         </class>
8867
8868         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
8869                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8870                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8871                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8872                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8873                         <field reporter:label="Year" name="year" reporter:datatype="int" />
8874                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8875                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8876                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8877                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8878                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8879                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8880                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8881                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8882                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8883                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8884                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8885                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8886                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8887                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8888                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8889                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8890                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8891                 </fields>
8892                 <links>
8893                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8894                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8895             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8896             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8897             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8898             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8899             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8900             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8901             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8902             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8903             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8904                 </links>
8905         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8906             <actions>
8907                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8908                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8909                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8910                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8911             </actions>
8912         </permacrud>
8913         </class>
8914
8915         <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">
8916                 <fields oils_persist:primary="fund">
8917                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8918                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8919                 </fields>
8920                 <links>
8921                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8922                 </links>
8923         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8924             <actions>
8925                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8926                                         <context link="fund" field="org" />
8927                 </retrieve>
8928             </actions>
8929         </permacrud>
8930         </class>
8931
8932         <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">
8933                 <fields oils_persist:primary="fund">
8934                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8935                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8936                 </fields>
8937                 <links>
8938                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8939                 </links>
8940         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8941             <actions>
8942                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8943                                         <context link="fund" field="org" />
8944                 </retrieve>
8945             </actions>
8946         </permacrud>
8947         </class>
8948
8949         <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">
8950                 <fields oils_persist:primary="fund">
8951                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8952                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8953                 </fields>
8954                 <links>
8955                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8956                 </links>
8957         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8958             <actions>
8959                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8960                                         <context link="fund" field="org" />
8961                 </retrieve>
8962             </actions>
8963         </permacrud>
8964         </class>
8965
8966         <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">
8967                 <fields oils_persist:primary="fund">
8968                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8969                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8970                 </fields>
8971                 <links>
8972                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8973                 </links>
8974         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8975             <actions>
8976                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8977                                         <context link="fund" field="org" />
8978                 </retrieve>
8979             </actions>
8980         </permacrud>
8981         </class>
8982
8983         <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">
8984                 <fields oils_persist:primary="fund">
8985                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8986                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8987                 </fields>
8988                 <links>
8989                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8990                 </links>
8991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8992             <actions>
8993                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8994                                         <context link="fund" field="org" />
8995                 </retrieve>
8996             </actions>
8997         </permacrud>
8998         </class>
8999
9000    <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">
9001         <fields oils_persist:primary="fund">
9002             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9003             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9004         </fields>
9005         <links>
9006             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9007         </links>
9008     </class>
9009
9010    <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">
9011         <fields oils_persist:primary="fund">
9012             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9013             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
9014         </fields>
9015         <links>
9016             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9017         </links>
9018     </class>
9019
9020    <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">
9021         <fields oils_persist:primary="fund">
9022             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9023             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9024         </fields>
9025         <links>
9026             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9027         </links>
9028     </class>
9029
9030    <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">
9031         <fields oils_persist:primary="fund">
9032             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9033             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
9034         </fields>
9035         <links>
9036             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9037         </links>
9038     </class>
9039
9040    <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">
9041         <fields oils_persist:primary="fund">
9042             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9043             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
9044         </fields>
9045         <links>
9046             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9047         </links>
9048     </class>
9049
9050         <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">
9051                 <fields oils_persist:primary="funding_source">
9052                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9053                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
9054                 </fields>
9055                 <links>
9056                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9057                 </links>
9058         </class>
9059
9060         <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">
9061                 <fields oils_persist:primary="funding_source">
9062                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9063                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
9064                 </fields>
9065                 <links>
9066                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9067                 </links>
9068         </class>
9069
9070         <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">
9071                 <fields oils_persist:primary="funding_source">
9072                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9073                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
9074                 </fields>
9075                 <links>
9076                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9077                 </links>
9078         </class>
9079
9080         <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">
9081                 <fields oils_persist:primary="fund">
9082                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9083                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
9084                 </fields>
9085                 <links>
9086                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9087                 </links>
9088         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9089             <actions>
9090                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9091                                         <context link="fund" field="org" />
9092                 </retrieve>
9093             </actions>
9094         </permacrud>
9095     </class>
9096     <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">
9097         <oils_persist:source_definition><![CDATA[
9098             SELECT
9099                 acqf.*,
9100                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
9101                 COALESCE(acqfst.amount, 0.00) AS spent_total,
9102                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
9103                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
9104             FROM
9105                 acq.fund acqf
9106                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
9107                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
9108                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
9109                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
9110         ]]></oils_persist:source_definition>
9111         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9112             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9113             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9114             <field reporter:label="Name" name="name" reporter:datatype="text" />
9115             <field reporter:label="Year" name="year" reporter:datatype="int" />
9116             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9117             <field reporter:label="Code" name="code" reporter:datatype="text" />
9118             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9119             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9120             <field reporter:label="Active" name="active" reporter:datatype="bool" />
9121             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9122             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9123
9124             <!-- non fund-native fields -->
9125             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
9126             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
9127             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
9128             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
9129         </fields>
9130         <links>
9131             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
9132             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9133             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9134         </links>
9135         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9136             <actions>
9137                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9138             </actions>
9139         </permacrud>
9140         </class>
9141         <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">
9142                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
9143                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9144                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9145                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9146                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9147                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9148                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9149                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9150                 </fields>
9151                 <links>
9152                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9153                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9154                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9155                 </links>
9156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9157                         <actions>
9158                                 <create permission="ADMIN_ACQ_FUND">
9159                     <context link="fund" field="org"/>
9160                 </create>
9161                                 <retrieve permission="ADMIN_ACQ_FUND">
9162                     <context link="fund" field="org"/>
9163                 </retrieve>
9164                                 <update permission="ADMIN_ACQ_FUND">
9165                     <context link="fund" field="org"/>
9166                 </update>
9167                                 <delete permission="ADMIN_ACQ_FUND">
9168                     <context link="fund" field="org"/>
9169                 </delete>
9170                         </actions>
9171                 </permacrud>
9172         </class>
9173
9174     <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">
9175         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
9176             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9177             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9178             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9179             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
9180             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
9181             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9182             <field reporter:label="Note" name="note" reporter:datatype="text" />
9183             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9184         </fields>
9185         <links>
9186             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9187             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9188             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9189         </links>
9190                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9191                         <actions>
9192                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9193                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9194                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9195                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9196                         </actions>
9197                 </permacrud>
9198     </class>
9199
9200         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
9201                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
9202                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
9203                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9204                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
9205                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9206                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9207                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9208                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
9209                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
9210                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9211                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9212                 </fields>
9213                 <links>
9214                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9215                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9216                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9217                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9218                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
9219                 </links>
9220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9221                         <actions>
9222                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
9223                         </actions>
9224                 </permacrud>
9225         </class>
9226
9227         <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">
9228                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
9229                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9230                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
9231                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9232                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
9233                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
9234                 </fields>
9235                 <links>
9236                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9237                 </links>
9238                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9239                         <actions>
9240                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9241                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
9242                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9243                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9244                         </actions>
9245                 </permacrud>
9246         </class>
9247
9248         <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">
9249                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
9250                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9251                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9252                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9253                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9254                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9255                         <field reporter:label="State" name="state" reporter:datatype="text" />
9256                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
9257                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9258                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9259                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
9260                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9261                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9262                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9263                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
9264                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
9265                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
9266                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
9267                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
9268                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
9269                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9270                 </fields>
9271                 <links>
9272                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9273                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9274                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9275                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
9276                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9277                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
9278                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
9279                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
9280                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9281                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9282                 </links>
9283                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9284                         <actions>
9285                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9286                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9287                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9288                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9289                         </actions>
9290                 </permacrud>
9291         </class>
9292
9293         <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">
9294                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
9295                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9296                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9297                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9298                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
9299                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9300                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9301                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9302                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9303                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9304                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9305                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9306                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9307                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
9308                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9309                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9310                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9311                 </fields>
9312                 <links>
9313                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
9314                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9315                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9316                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9317                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9318                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9319                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9320                 </links>
9321                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9322             <actions>
9323                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9324             </actions>
9325                 </permacrud>
9326         </class>
9327
9328         <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">
9329                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
9330                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9331                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9332                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9333                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9334                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9335                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9336                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
9337                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9338                 </fields>
9339                 <links>
9340                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9341                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9342                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9343                 </links>
9344                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9345             <actions>
9346                 <create permission="CREATE_PURCHASE_ORDER">
9347                     <context link="purchase_order" field="ordering_agency"/>
9348                 </create>
9349                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9350                     <context link="purchase_order" field="ordering_agency"/>
9351                 </retrieve>
9352                 <update permission="CREATE_PURCHASE_ORDER">
9353                     <context link="purchase_order" field="ordering_agency"/>
9354                 </update>
9355                 <delete permission="CREATE_PURCHASE_ORDER">
9356                     <context link="purchase_order" field="ordering_agency"/>
9357                 </delete>
9358             </actions>
9359                 </permacrud>
9360         </class>
9361
9362         <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">
9363                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
9364                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9365                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9366                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9367                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
9368                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
9369                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
9370                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9371                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
9372                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9373                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9374                 </fields>
9375                 <links>
9376                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9377                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9378                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9379                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9380                 </links>
9381                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9382             <actions>
9383                 <create permission="CREATE_PURCHASE_ORDER">
9384                     <context link="purchase_order" field="ordering_agency"/>
9385                 </create>
9386                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9387                     <context link="purchase_order" field="ordering_agency"/>
9388                 </retrieve>
9389                 <update permission="CREATE_PURCHASE_ORDER">
9390                     <context link="purchase_order" field="ordering_agency"/>
9391                 </update>
9392                 <delete permission="CREATE_PURCHASE_ORDER">
9393                     <context link="purchase_order" field="ordering_agency"/>
9394                 </delete>
9395             </actions>
9396                 </permacrud>
9397         </class>
9398
9399         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
9400                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
9401                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
9402                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
9403                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
9404                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9405                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9406                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9407                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9408                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
9409                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
9410                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
9411                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
9412                         <field reporter:label="State" name="state" reporter:datatype="text" />
9413                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9414                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9415                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
9416                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9417                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9418                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9419                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
9420                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9421                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9422                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
9423                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
9424                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
9425                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
9426                 </fields>
9427                 <links>
9428                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9429                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9430                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9431                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9432                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9433                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9434                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9435                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
9436                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
9437                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
9438                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9439                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
9440                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9441                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
9442                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
9443                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9444                 </links>
9445                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9446                         <actions>
9447                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
9448                                         <context link="purchase_order" field="ordering_agency"/>
9449                                         <context link="picklist" field="org_unit"/>
9450                                 </retrieve>
9451                         </actions>
9452                 </permacrud>
9453         </class>
9454
9455         <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">
9456                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
9457                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9458                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9459                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9460                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
9461                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9462                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9463                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
9464                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9465                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9466                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
9467                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
9468                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9469                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9470                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
9471                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
9472                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
9473                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9474                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
9475                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9476                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9477                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9478                 </fields>
9479                 <links>
9480                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
9481                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9482                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9483                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9484                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9485                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9486                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9487                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9488                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9489                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9490                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9491                 </links>
9492                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9493                         <actions>
9494                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9495                                         <context link="purchase_order" field="ordering_agency"/>
9496                                         <context link="picklist" field="org_unit"/>
9497                                 </retrieve>
9498                         </actions>
9499                 </permacrud>
9500         </class>
9501
9502         <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">
9503                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
9504                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
9505                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9506                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9507                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9508                 </fields>
9509                 <links>
9510                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9511                 </links>
9512                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9513                         <actions>
9514                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9515                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
9516                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9517                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9518                         </actions>
9519                 </permacrud>
9520         </class>
9521
9522         <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">
9523                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
9524                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
9525                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
9526                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9527                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9528                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9529                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9530                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9531                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
9532                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9533                 </fields>
9534                 <links>
9535                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9536                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9537                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9538                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
9539                 </links>
9540         </class>
9541
9542         <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">
9543                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
9544                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
9545                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
9546                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
9547                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
9548                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
9549                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
9550                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
9551                 </fields>
9552                 <links>
9553                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9554                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
9555                 </links>
9556         </class>
9557
9558         <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">
9559                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
9560                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
9561                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9562                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
9563                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
9564                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
9565                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
9566                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
9567                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9568                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
9569                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9570                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
9571                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
9572                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9573                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
9574                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9575                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
9576                 </fields>
9577                 <links>
9578                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9579                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
9580                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9581                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9582                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9583                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9584                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9585                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9586                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
9587                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
9588                 </links>
9589         </class>
9590
9591         <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">
9592                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9593                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9594                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9595                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9596                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9597                 </fields>
9598                 <links/>
9599                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9600                         <actions>
9601                                 <retrieve />
9602                         </actions>
9603                 </permacrud>
9604         </class>
9605
9606         <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">
9607                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9608                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9609                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9610                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9611                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9612                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9613             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9614                 </fields>
9615                 <links/>
9616         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9617             <actions>
9618                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9619                 <retrieve />
9620                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9621                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9622             </actions>
9623         </permacrud>
9624         </class>
9625
9626         <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">
9627                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9628                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9629                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9630                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9631                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9632                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9633                 </fields>
9634                 <links/>
9635         </class>
9636         <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">
9637                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9638                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9639                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9640                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9641                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9642                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9643                 </fields>
9644                 <links>
9645                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9646                 </links>
9647         </class>
9648
9649         <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">
9650             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9651                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9652                 <field reporter:label="Code" name="code" reporter:datatype="text" />
9653                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9654                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9655                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9656                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9657         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9658
9659             </fields>
9660             <links>
9661                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9662             </links>
9663             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9664                 <actions>
9665                     <create permission="ADMIN_PROVIDER">
9666                         <context link="provider" field="owner"/>
9667                     </create>
9668                     <retrieve permission="ADMIN_PROVIDER">
9669                         <context link="provider" field="owner"/>
9670                     </retrieve>
9671                     <update permission="ADMIN_PROVIDER">
9672                         <context link="provider" field="owner"/>
9673                     </update>
9674                     <delete permission="ADMIN_PROVIDER">
9675                         <context link="provider" field="owner"/>
9676                     </delete>
9677                 </actions>
9678             </permacrud>
9679         </class>
9680         
9681         <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">
9682             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
9683                 <field reporter:label="ID" name="id" reporter:datatype="id" />
9684                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9685                 <field reporter:label="Name" name="name" reporter:datatype="text" />
9686                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
9687             </fields>
9688             <links>
9689                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9690             </links>
9691             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9692                 <actions>
9693                     <create permission="ADMIN_PROVIDER">
9694                         <context link="provider" field="owner"/>
9695                     </create>
9696                     <retrieve permission="ADMIN_PROVIDER">
9697                         <context link="provider" field="owner"/>
9698                     </retrieve>
9699                     <update permission="ADMIN_PROVIDER">
9700                         <context link="provider" field="owner"/>
9701                     </update>
9702                     <delete permission="ADMIN_PROVIDER">
9703                         <context link="provider" field="owner"/>
9704                     </delete>
9705                 </actions>
9706             </permacrud>
9707         </class>
9708         
9709         <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">
9710             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9711                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9712                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9713                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9714                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9715                 </fields>
9716                 <links/>
9717         </class>
9718
9719         <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">
9720                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
9721                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
9722                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
9723                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
9724                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
9725                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
9726                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
9727                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
9728                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
9729                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
9730                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
9731                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
9732                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
9733                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
9734                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
9735                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes"/>
9736                 </fields>
9737                 <links>
9738                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9739                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9740                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9741                 </links>
9742         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9743             <actions>
9744                 <create permission="ADMIN_PROVIDER">
9745                     <context link="provider" field="owner"/>
9746                 </create>
9747                 <retrieve permission="ADMIN_PROVIDER">
9748                     <context link="provider" field="owner"/>
9749                 </retrieve>
9750                 <update permission="ADMIN_PROVIDER">
9751                     <context link="provider" field="owner"/>
9752                 </update>
9753                 <delete permission="ADMIN_PROVIDER">
9754                     <context link="provider" field="owner"/>
9755                 </delete>
9756             </actions>
9757         </permacrud>
9758         </class>
9759
9760         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
9761                 oils_obj:fieldmapper="acq::edi_attr" 
9762                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
9763                 <fields oils_persist:primary="key">
9764                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
9765                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9766                 </fields>
9767         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9768             <actions>
9769                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9770                 <retrieve/>
9771                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9772                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9773             </actions>
9774         </permacrud>
9775         </class>
9776         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
9777                 oils_obj:fieldmapper="acq::edi_attr_set" 
9778                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
9779                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
9780                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9781                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9782                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
9783                 </fields>
9784                 <links>
9785                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
9786                 </links>
9787         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9788             <actions>
9789                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9790                 <retrieve/>
9791                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9792                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9793             </actions>
9794         </permacrud>
9795         </class>
9796         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
9797                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
9798                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
9799                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
9800                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9801                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
9802                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
9803                 </fields>
9804                 <links>
9805                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9806                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
9807                 </links>
9808         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9809             <actions>
9810                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9811                 <retrieve/>
9812                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9813                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9814             </actions>
9815         </permacrud>
9816         </class>
9817
9818
9819         <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">
9820                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
9821                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
9822                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
9823                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
9824                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
9825                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
9826                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
9827                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
9828                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
9829                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
9830                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
9831                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
9832                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
9833                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
9834                 </fields>
9835                 <links>
9836                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
9837                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9838                 </links>
9839         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9840             <actions>
9841                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9842                     <context link="account" jump="provider" field="owner"/>
9843                 </retrieve>
9844                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9845                     <context link="account" jump="provider" field="owner"/>
9846                 </update>
9847                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9848                     <context link="account" jump="provider" field="owner"/>
9849                 </delete>
9850             </actions>
9851         </permacrud>
9852         </class>
9853
9854
9855         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
9856                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
9857                         <field name="id" reporter:datatype="id" />
9858                         <field name="parent" reporter:datatype="link"/>
9859                         <field name="owner" reporter:datatype="link"/>
9860                         <field name="create_time" reporter:datatype="timestamp"/>
9861                         <field name="name" reporter:datatype="text"/>
9862                         <field name="shared" reporter:datatype="bool"/>
9863                         <field name="share_with" reporter:datatype="link"/>
9864                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9865                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
9866                 </fields>
9867                 <links>
9868                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9869                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
9870                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
9871                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9872                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
9873                 </links>
9874         </class>
9875         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
9876                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
9877                         <field name="id" reporter:datatype="id" />
9878                         <field name="parent" reporter:datatype="link"/>
9879                         <field name="owner" reporter:datatype="link"/>
9880                         <field name="create_time" reporter:datatype="timestamp"/>
9881                         <field name="name" reporter:datatype="text"/>
9882                         <field name="shared" reporter:datatype="bool"/>
9883                         <field name="share_with" reporter:datatype="link"/>
9884                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9885                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
9886                 </fields>
9887                 <links>
9888                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9889                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
9890                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
9891                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9892                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
9893                 </links>
9894         </class>
9895         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
9896                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
9897                         <field name="id" reporter:datatype="id" />
9898                         <field name="parent" reporter:datatype="link"/>
9899                         <field name="owner" reporter:datatype="link"/>
9900                         <field name="create_time" reporter:datatype="timestamp"/>
9901                         <field name="name" reporter:datatype="text"/>
9902                         <field name="shared" reporter:datatype="bool"/>
9903                         <field name="share_with" reporter:datatype="link"/>
9904                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9905                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9906                 </fields>
9907                 <links>
9908                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9909                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
9910                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
9911                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9912                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
9913                 </links>
9914         </class>
9915         <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">
9916                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
9917                         <field name="id" reporter:datatype="id" />
9918                         <field name="owner" reporter:datatype="link"/>
9919                         <field name="create_time" reporter:datatype="timestamp"/>
9920                         <field name="name" reporter:datatype="text"/>
9921                         <field name="data" reporter:datatype="text"/>
9922                         <field name="folder" reporter:datatype="link"/>
9923                         <field name="description" reporter:datatype="text"/>
9924                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9925                 </fields>
9926                 <links>
9927                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9928                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
9929                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
9930                 </links>
9931         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9932             <actions>
9933                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9934                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9935                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9936                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9937             </actions>
9938         </permacrud>
9939         </class>
9940         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
9941                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
9942                         <field name="id" reporter:datatype="id" />
9943                         <field name="owner" reporter:datatype="link"/>
9944                         <field name="create_time" reporter:datatype="timestamp"/>
9945                         <field name="template" reporter:datatype="link"/>
9946                         <field name="data" reporter:datatype="text"/>
9947                         <field name="folder" reporter:datatype="link"/>
9948                         <field name="recur" reporter:datatype="bool"/>
9949                         <field name="recurrence" reporter:datatype="interval"/>
9950                         <field name="name" reporter:datatype="text"/>
9951                         <field name="description" reporter:datatype="text"/>
9952                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9953                 </fields>
9954                 <links>
9955                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9956                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
9957                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
9958                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
9959                 </links>
9960         </class>
9961         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
9962                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
9963                         <field name="id" reporter:datatype="id" />
9964                         <field name="runner" reporter:datatype="link"/>
9965                         <field name="start_time" reporter:datatype="timestamp"/>
9966                         <field name="complete_time" reporter:datatype="timestamp"/>
9967                         <field name="run_time" reporter:datatype="timestamp"/>
9968                         <field name="email" reporter:datatype="text"/>
9969                         <field name="excel_format" reporter:datatype="bool"/>
9970                         <field name="csv_format" reporter:datatype="bool"/>
9971                         <field name="html_format" reporter:datatype="bool"/>
9972                         <field name="error_code" reporter:datatype="int"/>
9973                         <field name="error_text" reporter:datatype="text"/>
9974                         <field name="report" reporter:datatype="link"/>
9975                         <field name="folder" reporter:datatype="link"/>
9976                         <field name="chart_pie" reporter:datatype="bool"/>
9977                         <field name="chart_bar" reporter:datatype="bool"/>
9978                         <field name="chart_line" reporter:datatype="bool"/>
9979                 </fields>
9980                 <links>
9981                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9982                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9983                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9984                 </links>
9985         </class>
9986         <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">
9987                 <fields oils_persist:primary="id">
9988                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9989                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9990                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9991                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9992                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9993                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9994                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9995                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9996                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9997                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9998                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9999                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10000                 </fields>
10001                 <links>
10002                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10003                 </links>
10004                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10005                         <actions>
10006                                 <retrieve />
10007                         </actions>
10008                 </permacrud>
10009         </class>
10010         <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">
10011                 <fields oils_persist:primary="id">
10012                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10013                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10014                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10015                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10016                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10017                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10018                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10019                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10020                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10021                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10022                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10023                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10024                 </fields>
10025                 <links>
10026                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10027                 </links>
10028         </class>
10029         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
10030                 <fields oils_persist:primary="id">
10031                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10032                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
10033                         <field reporter:label="Fingerprint" name="fingerprint" />
10034                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10035                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10036                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10037                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10038                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
10039                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10040                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10041                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10042                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
10043                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
10044                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
10045                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10046                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10047                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
10048                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
10049                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
10050                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
10051                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
10052                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
10053                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10054                 </fields>
10055                 <links>
10056                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
10057                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10058                 </links>
10059         </class>
10060         <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">
10061                 <fields oils_persist:primary="id">
10062                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
10063                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
10064                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
10065                 </fields>
10066                 <links>
10067                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
10068                 </links>
10069         </class>
10070         <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">
10071                 <fields oils_persist:primary="id">
10072                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
10073                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
10074                 </fields>
10075                 <links>
10076                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
10077                 </links>
10078         </class>
10079         <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">
10080                 <fields oils_persist:primary="id">
10081                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
10082                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
10083                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
10084                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
10085                 </fields>
10086                 <links>
10087                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
10088                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
10089                 </links>
10090         </class>
10091         <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">
10092                 <fields oils_persist:primary="xact">
10093                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10094                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
10095                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
10096                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
10097                 </fields>
10098                 <links>
10099                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10100                 </links>
10101         </class>
10102         <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">
10103                 <fields oils_persist:primary="xact">
10104                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10105                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
10106                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
10107                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
10108                 </fields>
10109                 <links>
10110                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10111                 </links>
10112         </class>
10113         <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)">
10114                 <fields oils_persist:primary="id">
10115                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
10116                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
10117                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
10118                 </fields>
10119                 <links>
10120                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10121                 </links>
10122         </class>
10123         <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">
10124                 <fields oils_persist:primary="id">
10125                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
10126                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
10127                 </fields>
10128                 <links>
10129                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10130                 </links>
10131         </class>
10132         <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">
10133                 <fields oils_persist:primary="bibid">
10134                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
10135                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
10136                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
10137                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
10138                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
10139                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
10140                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
10141                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
10142                 </fields>
10143                 <links>
10144                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
10145                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10146                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10147                 </links>
10148         </class>
10149         <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">
10150                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
10151                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
10152                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
10153                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
10154                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
10155                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
10156                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
10157                 </fields>
10158                 <links>
10159                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10160                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
10161                 </links>
10162                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10163                         <actions>
10164                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10165                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10166                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10167                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10168                         </actions>
10169                 </permacrud>
10170         </class>
10171         <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">
10172                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
10173                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
10174                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
10175                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
10176                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10177                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10178                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
10179                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10180                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
10181                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
10182                 </fields>
10183                 <links>
10184                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10185                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10186                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10187                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10188                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10189                 </links>
10190                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10191                         <actions>
10192                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
10193                                         <context link="formula" field="owner"/>
10194                                 </create>
10195                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
10196                                         <context link="formula" field="owner"/>
10197                                 </retrieve>
10198                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
10199                                         <context link="formula" field="owner"/>
10200                                 </update>
10201                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
10202                                         <context link="formula" field="owner"/>
10203                                 </delete>
10204                         </actions>
10205                 </permacrud>
10206         </class>
10207
10208         <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">
10209                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
10210                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10211                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10212                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10213                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
10214                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10215                 </fields>
10216                 <links>
10217                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10218                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10219                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10220                 </links>
10221                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10222                         <actions>
10223                                 <create permission="CREATE_PURCHASE_ORDER">
10224                                         <context link="formula" field="owner"/>
10225                 </create>
10226                                 <retrieve permission="CREATE_PURCHASE_ORDER">
10227                                         <context link="formula" field="owner"/>
10228                 </retrieve>
10229                                 <update permission="CREATE_PURCHASE_ORDER">
10230                                         <context link="formula" field="owner"/>
10231                 </update>
10232                                 <delete permission="CREATE_PURCHASE_ORDER">
10233                                         <context link="formula" field="owner"/>
10234                 </delete>
10235                         </actions>
10236                 </permacrud>
10237         </class>
10238
10239         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
10240                 <fields oils_persist:primary="id">
10241                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
10242                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10243                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
10244                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
10245                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
10246                 </fields>
10247                 <links>
10248                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10249                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
10250                 </links>
10251         </class>
10252
10253         <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">
10254                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
10255                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10256                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10257                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10258                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10259                 </fields>
10260                 <links>
10261                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10262                 </links>
10263                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10264                         <actions>
10265                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10266                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10267                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10268                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10269                         </actions>
10270                 </permacrud>
10271         </class>
10272
10273         <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">
10274                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
10275                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10276                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10277                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10278                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10279                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
10280                 </fields>
10281                 <links>
10282                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10283                 </links>
10284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10285                         <actions>
10286                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10287                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10288                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10289                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10290                         </actions>
10291                 </permacrud>
10292         </class>
10293
10294         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
10295                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
10296                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10297                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10298                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10299                 </fields>
10300                 <links>
10301                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10302                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10303                 </links>
10304         </class>
10305
10306         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
10307                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
10308                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10309                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10310                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10311                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10312                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10313                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10314                 </fields>
10315                 <links>
10316                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10317                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
10318                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10319                 </links>
10320         </class>
10321
10322         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
10323                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
10324                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10325                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10326                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
10327                 </fields>
10328                 <links>
10329                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10330                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
10331                 </links>
10332         </class>
10333
10334         <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">
10335                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
10336                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10337                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10338                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10339                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10340                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10341                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10342                 </fields>
10343                 <links>
10344                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10345                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
10346                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10347                 </links>
10348         </class>
10349
10350         <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">
10351                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
10352                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
10353                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10354                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
10355                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10356                 </fields>
10357                 <links>
10358                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10359                 </links>
10360                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10361             <actions>
10362                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10363                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
10364                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10365                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10366             </actions>
10367                 </permacrud>
10368         </class>
10369
10370         <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">
10371                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
10372                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
10373                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
10374                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
10375                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
10376                 </fields>
10377                 <links>
10378                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10379                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
10380                 </links>
10381                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10382                         <actions>
10383                                 <create permission="ADMIN_CLAIM_POLICY">
10384                                         <context link="claim_policy" field="org_unit"/>
10385                 </create>
10386                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
10387                                         <context link="claim_policy" field="org_unit"/>
10388                 </retrieve>
10389                                 <update permission="ADMIN_CLAIM_POLICY">
10390                                         <context link="claim_policy" field="org_unit"/>
10391                 </update>
10392                                 <delete permission="ADMIN_CLAIM_POLICY">
10393                                         <context link="claim_policy" field="org_unit"/>
10394                 </delete>
10395                         </actions>
10396                 </permacrud>
10397         </class>
10398
10399     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
10400         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
10401             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10402             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
10403             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10404             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
10405             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
10406             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
10407             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
10408             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
10409             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
10410             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
10411             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
10412             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
10413             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
10414             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
10415             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10416             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
10417                                                 <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
10418                                                 <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
10419                                                 <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
10420         </fields>
10421         <links>
10422             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
10423         </links>
10424     </class>
10425
10426     <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">
10427         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
10428             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10429             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10430             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10431             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10432             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10433         </fields>
10434     </class>
10435
10436     <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">
10437         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10438             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10439             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10440             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10441             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10442             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10443             <field reporter:label="City" name="city" reporter:datatype="text"/>
10444             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10445             <field reporter:label="State" name="state" reporter:datatype="text"/>
10446             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10447             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10448             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10449         </fields>
10450     </class>
10451
10452     <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">
10453         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10454             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10455             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10456             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10457             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10458             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10459             <field reporter:label="City" name="city" reporter:datatype="text"/>
10460             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10461             <field reporter:label="State" name="state" reporter:datatype="text"/>
10462             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10463             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10464             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10465         </fields>
10466     </class>
10467
10468     <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">
10469         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
10470             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10471             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10472             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10473             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
10474             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
10475             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10476         </fields>
10477     </class>
10478
10479     <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">
10480         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
10481             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10482             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10483             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10484             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
10485             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
10486             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10487         </fields>
10488     </class>
10489
10490         <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">
10491                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
10492                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
10493                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10494                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
10495                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
10496                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
10497                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
10498                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
10499                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
10500                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10501                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10502                 </fields>
10503                 <links>
10504                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10505                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10506                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
10507                 </links>
10508                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10509                         <actions>
10510                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10511                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10512                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10513                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10514                         </actions>
10515                 </permacrud>
10516         </class>
10517
10518         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
10519                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
10520                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
10521                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10522                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10523                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
10524                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
10525                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
10526                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
10527                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
10528                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
10529                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
10530                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
10531                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
10532                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
10533                 </fields>
10534                 <links>
10535                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10536                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10537                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10538                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
10539                 </links>
10540                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10541                         <actions>
10542                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10543                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10544                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10545                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10546                         </actions>
10547                 </permacrud>
10548         </class>
10549
10550         <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">
10551                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
10552                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
10553                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
10554                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
10555                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
10556                 </fields>
10557                 <links>
10558                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
10559                 </links>
10560                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
10561                         <actions>
10562                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10563                     <context link="fieldset" field="owning_lib"/>
10564                 </create>
10565                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10566                     <context link="fieldset" field="owning_lib"/>
10567                 </retrieve>
10568                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10569                     <context link="fieldset" field="owning_lib"/>
10570                 </update>
10571                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10572                     <context link="fieldset" field="owning_lib"/>
10573                 </delete>
10574                         </actions>
10575                 </permacrud>
10576         </class>
10577
10578     <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">
10579         <fields>
10580             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10581             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10582             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10583         </fields>
10584                 <links>
10585                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10586                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10587                 </links>
10588     </class>
10589
10590     <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">
10591         <fields>
10592             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10593             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
10594         </fields>
10595                 <links>
10596                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10597                 </links>
10598     </class>
10599
10600     <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">
10601         <fields>
10602             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10603             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10604             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10605         </fields>
10606                 <links>
10607                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10608                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10609                 </links>
10610     </class>
10611
10612     <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">
10613         <fields>
10614             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10615             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
10616         </fields>
10617                 <links>
10618                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10619                 </links>
10620     </class>
10621
10622     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
10623                 <oils_persist:source_definition>
10624
10625             SELECT  DISTINCT l.*
10626               FROM  action.unfulfilled_hold_loops l
10627                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
10628               WHERE l.count = m.max
10629
10630                 </oils_persist:source_definition>
10631         <fields>
10632             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10633             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10634             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10635         </fields>
10636                 <links>
10637                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10638                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10639                 </links>
10640     </class>
10641
10642         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
10643                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
10644                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
10645                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
10646                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
10647                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
10648                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
10649                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
10650                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
10651                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
10652                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
10653                 </fields>
10654                 <links>
10655                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
10656                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
10657                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
10658                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
10659                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
10660                 </links>
10661         </class>
10662
10663         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
10664                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
10665                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
10666                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
10667                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10668                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
10669                 </fields>
10670                 <links>
10671                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
10672                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
10673                 </links>
10674         </class>
10675
10676         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
10677                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
10678                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
10679                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
10680                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
10681                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
10682                 </fields>
10683                 <links>
10684                 </links>
10685         </class>
10686
10687         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
10688                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
10689                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
10690                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
10691                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10692                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
10693                 </fields>
10694                 <links>
10695                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
10696                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
10697                 </links>
10698         </class>
10699         
10700         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
10701                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
10702                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
10703                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
10704                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
10705                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
10706                 </fields>
10707                 <links>
10708                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
10709                 </links>
10710         </class>
10711         
10712         <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">
10713                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
10714                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
10715                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10716                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10717                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
10718                 </fields>
10719                 <links>
10720                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10721                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
10722                 </links>
10723         </class>
10724
10725         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
10726                 <fields oils_persist:primary="name">
10727                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
10728                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
10729                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
10730                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10731                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
10732                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
10733                 </fields>
10734                 <links>
10735                 </links>
10736         </class>
10737
10738         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
10739                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10740                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10741                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
10742                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10743                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10744                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10745                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10746                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10747                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10748                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10749                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10750                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10751                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10752                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10753                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10754                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10755                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10756                 </fields>
10757                 <links>
10758                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10759                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10760                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10761                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10762                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10763                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10764                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10765                 </links>
10766         </class>
10767
10768         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
10769                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
10770                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
10771                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10772                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10773                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
10774                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
10775                 </fields>
10776                 <links>
10777                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10778                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
10779                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
10780                 </links>
10781         </class>
10782
10783         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
10784                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
10785                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
10786                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
10787                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
10788                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
10789                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
10790                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
10791                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10792                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
10793                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10794                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
10795                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
10796                 </fields>
10797                 <links>
10798                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10799                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
10800                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
10801                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
10802                 </links>
10803         </class>
10804
10805         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
10806                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
10807                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
10808                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
10809                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10810                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10811                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
10812                 </fields>
10813                 <links>
10814                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
10815                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
10816                 </links>
10817         </class>
10818
10819         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
10820                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
10821                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
10822                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10823                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10824                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10825                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
10826                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
10827                 </fields>
10828                 <links>
10829                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10830                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10831                 </links>
10832         </class>
10833
10834         <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">
10835                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
10836                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
10837                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10838                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10839                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10840                 </fields>
10841                 <links>
10842                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10843                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10844                 </links>
10845         </class>
10846
10847         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
10848                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10849                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10850                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10851                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10852                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10853                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10854                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10855                 </fields>
10856                 <links>
10857                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10858                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10859                 </links>
10860         </class>
10861
10862         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
10863                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10864                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10865                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10866                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10867                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10868                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10869                 </fields>
10870                 <links>
10871                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10872                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10873                 </links>
10874         </class>
10875
10876         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
10877                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10878                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10879                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10880                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10881                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10882                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10883                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10884                 </fields>
10885                 <links>
10886                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10887                 </links>
10888         </class>
10889
10890         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
10891                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10892                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10893                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10894                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10895                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10896                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10897                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10898                 </fields>
10899                 <links>
10900                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10901                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10902                 </links>
10903         </class>
10904
10905         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
10906                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10907                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10908                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10909                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10910                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10911                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10912                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10913                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10914                 </fields>
10915                 <links>
10916                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10917                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10918                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10919                 </links>
10920         </class>
10921
10922         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
10923                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10924                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10925                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10926                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10927                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10928                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10929                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10930                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10931                 </fields>
10932                 <links>
10933                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10934                 </links>
10935         </class>
10936
10937         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
10938                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10939                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10940                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10941                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10942                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10943                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10944                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10945                 </fields>
10946                 <links>
10947                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10948                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10949                 </links>
10950         </class>
10951
10952         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
10953                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10954                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10955                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10956                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10957                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10958                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10959                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10960                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10961                 </fields>
10962                 <links>
10963                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10964                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10965                 </links>
10966         </class>
10967
10968         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
10969                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10970                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10971                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10972                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10973                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10974                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10975                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10976                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10977                 </fields>
10978                 <links>
10979                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10980                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10981                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10982                 </links>
10983         </class>
10984
10985         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
10986                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10987                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10988                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10989                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10990                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10991                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10992                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10993                 </fields>
10994                 <links>
10995                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10996                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10997                 </links>
10998         </class>
10999
11000         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
11001                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11002                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11003                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11004                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11005                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11006                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11007                 </fields>
11008                 <links>
11009                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11010                 </links>
11011         </class>
11012
11013         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
11014                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11015                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11016                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11017                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11018                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11019                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11020                 </fields>
11021                 <links>
11022                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11023                 </links>
11024         </class>
11025
11026         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
11027                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11028                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11029                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11030                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11031                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11032                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11033                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11034                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11035                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11036                 </fields>
11037                 <links>
11038                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11039                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11040                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11041                 </links>
11042         </class>
11043
11044         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
11045                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11046                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11047                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11048                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11049                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11050                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11051                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11052                 </fields>
11053                 <links>
11054                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11055                 </links>
11056         </class>
11057
11058         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
11059                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11060                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11061                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11062                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11063                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11064                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11065                 </fields>
11066                 <links>
11067                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11068                 </links>
11069         </class>
11070
11071         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
11072                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11073                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11074                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11075                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11076                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11077                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11078                 </fields>
11079                 <links>
11080                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11081                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11082                 </links>
11083         </class>
11084
11085         <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">
11086                 <fields oils_persist:primary="id">
11087                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
11088                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
11089                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
11090                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
11091                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
11092                 </fields>
11093                 <links>
11094                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
11095                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11096                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
11097                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
11098                 </links>
11099         </class>
11100
11101         <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">
11102                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
11103                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11104                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
11105                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11106                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
11107                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11108                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11109                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
11110                 </fields>
11111                 <links/>
11112                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11113                         <actions>
11114                                 <retrieve/>
11115                         </actions>
11116                 </permacrud>
11117         </class>
11118
11119         <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">
11120                 <fields oils_persist:primary="ptype_key">
11121                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
11122                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11123                 </fields>
11124                 <links/>
11125                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11126                         <actions>
11127                                 <retrieve/>
11128                         </actions>
11129                 </permacrud>
11130         </class>
11131
11132         <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">
11133                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
11134                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11135                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
11136                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11137                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11138                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11139                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11140                 </fields>
11141                 <links>
11142                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
11143                 </links>
11144                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11145                         <actions>
11146                                 <retrieve/>
11147                         </actions>
11148                 </permacrud>
11149         </class>
11150
11151         <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">
11152                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
11153                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11154                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
11155                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
11156                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11157                 </fields>
11158                 <links>
11159                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11160                 </links>
11161                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11162                         <actions>
11163                                 <retrieve/>
11164                         </actions>
11165                 </permacrud>
11166         </class>
11167
11168     <class
11169         id="uvs"
11170         controller="open-ils.cstore open-ils.pcrud"
11171         oils_obj:fieldmapper="url_verify::session"
11172         oils_persist:tablename="url_verify.session"
11173         reporter:label="URL Verification Session"
11174     >
11175         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
11176             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
11177             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11178                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
11179             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
11180             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
11181             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11182             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
11183             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
11184             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
11185         </fields>
11186
11187         <links>
11188             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11189             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11190             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
11191             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
11192             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
11193         </links>
11194
11195         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11196             <actions>
11197                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
11198             </actions>
11199         </permacrud>
11200
11201     </class>
11202
11203     <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">
11204         <oils_persist:source_definition>
11205             SELECT
11206                 cbrebi.id AS id,  -- so we can have a pkey in our view
11207                 uvs.id AS session,
11208                 uvs.owning_lib,
11209                 cbrebi.target_biblio_record_entry
11210             FROM url_verify.session uvs
11211             JOIN container.biblio_record_entry_bucket cbreb
11212                 ON (uvs.container = cbreb.id)
11213             JOIN container.biblio_record_entry_bucket_item cbrebi
11214                 ON (cbrebi.bucket = cbreb.id)
11215         </oils_persist:source_definition>
11216         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
11217             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
11218             <field reporter:label="Session" name="session" reporter:datatype="link" />
11219             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
11220             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
11221         </fields>
11222         <links>
11223             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
11224             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
11225             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
11226         </links>
11227         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11228             <actions>
11229                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
11230             </actions>
11231         </permacrud>
11232     </class>
11233
11234     <class
11235         id="uvus"
11236         controller="open-ils.cstore open-ils.pcrud"
11237         oils_obj:fieldmapper="url_verify::url_selector"
11238         oils_persist:tablename="url_verify.url_selector"
11239         reporter:label="URL Verification URL Selector"
11240     >
11241         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
11242             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
11243             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
11244                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11245             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
11246         </fields>
11247
11248         <links>
11249             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11250             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
11251         </links>
11252
11253         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11254             <actions>
11255                 <create permission="URL_VERIFY">
11256                     <context link="session" field="owning_lib"/>
11257                 </create>
11258                 <retrieve permission="URL_VERIFY">
11259                     <context link="session" field="owning_lib"/>
11260                 </retrieve>
11261                 <update permission="URL_VERIFY">
11262                     <context link="session" field="owning_lib"/>
11263                 </update>
11264                 <delete permission="URL_VERIFY">
11265                     <context link="session" field="owning_lib"/>
11266                 </delete>
11267             </actions>
11268         </permacrud>
11269
11270     </class>
11271
11272     <class
11273         id="uvu"
11274         controller="open-ils.cstore open-ils.pcrud"
11275         oils_obj:fieldmapper="url_verify::url"
11276         oils_persist:tablename="url_verify.url"
11277         reporter:label="URL Verification URL"
11278     >
11279         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
11280             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
11281                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
11282                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
11283                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11284                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
11285             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11286             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11287             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
11288             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
11289             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
11290             <field reporter:label="Host" name="host" reporter:datatype="text"/>
11291             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
11292             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
11293             <field reporter:label="Path" name="path" reporter:datatype="text"/>
11294             <field reporter:label="Page" name="page" reporter:datatype="text"/>
11295             <field reporter:label="Query" name="query" reporter:datatype="text"/>
11296             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
11297             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
11298         </fields>
11299
11300         <links>
11301             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
11302             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
11303             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11304             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
11305             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
11306         </links>
11307
11308         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11309             <actions>
11310                 <create permission="URL_VERIFY">
11311                     <context link="session" field="owning_lib"/>
11312                 </create>
11313                 <retrieve permission="URL_VERIFY">
11314                     <context link="session" field="owning_lib"/>
11315                 </retrieve>
11316                 <update permission="URL_VERIFY">
11317                     <context link="session" field="owning_lib"/>
11318                 </update>
11319                 <delete permission="URL_VERIFY">
11320                     <context link="session" field="owning_lib"/>
11321                 </delete>
11322             </actions>
11323         </permacrud>
11324
11325     </class>
11326
11327     <class
11328         id="uvva"
11329         controller="open-ils.cstore open-ils.pcrud"
11330         oils_obj:fieldmapper="url_verify::verification_attempt"
11331         oils_persist:tablename="url_verify.verification_attempt"
11332         reporter:label="URL Verification Attempt"
11333     >
11334         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
11335             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
11336                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
11337                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
11338             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
11339             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
11340         </fields>
11341
11342         <links>
11343             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11344             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11345         </links>
11346
11347         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11348             <actions>
11349                 <create permission="URL_VERIFY">
11350                     <context link="session" field="owning_lib"/>
11351                 </create>
11352                 <retrieve permission="URL_VERIFY">
11353                     <context link="session" field="owning_lib"/>
11354                 </retrieve>
11355                 <update permission="URL_VERIFY">
11356                     <context link="session" field="owning_lib"/>
11357                 </update>
11358                 <delete permission="URL_VERIFY">
11359                     <context link="session" field="owning_lib"/>
11360                 </delete>
11361             </actions>
11362         </permacrud>
11363
11364     </class>
11365
11366     <class
11367         id="uvuv"
11368         controller="open-ils.cstore open-ils.pcrud"
11369         oils_obj:fieldmapper="url_verify::url_verification"
11370         oils_persist:tablename="url_verify.url_verification"
11371         reporter:label="URL Verification"
11372     >
11373         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
11374             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
11375                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
11376                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
11377             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
11378             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
11379             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
11380             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
11381                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
11382         </fields>
11383
11384         <links>
11385             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
11386             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
11387             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
11388         </links>
11389
11390         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11391             <actions>
11392                 <create permission="URL_VERIFY">
11393                     <context link="attempt" jump="session" field="owning_lib"/>
11394                 </create>
11395                 <retrieve permission="URL_VERIFY">
11396                     <context link="attempt" jump="session" field="owning_lib"/>
11397                 </retrieve>
11398                 <update permission="URL_VERIFY">
11399                     <context link="attempt" jump="session" field="owning_lib"/>
11400                 </update>
11401                 <delete permission="URL_VERIFY">
11402                     <context link="attempt" jump="session" field="owning_lib"/>
11403                 </delete>
11404             </actions>
11405         </permacrud>
11406
11407     </class>
11408
11409         <class
11410                 id="cfdi"
11411                 controller="open-ils.cstore open-ils.pcrud"
11412                 oils_obj:fieldmapper="config::filter_dialog_interface"
11413                 oils_persist:tablename="config.filter_dialog_interface"
11414                 reporter:label="FilterDialog Interface">
11415                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
11416                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
11417                         <field reporter:label="Description" name="description" reporter:datatype="text" />
11418                 </fields>
11419                 <links>
11420                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
11421                 </links>
11422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11423                         <actions>
11424                                 <retrieve />
11425                         </actions>
11426                 </permacrud>
11427         </class>
11428
11429         <class
11430                 id="cfdfs"
11431                 controller="open-ils.cstore open-ils.pcrud"
11432                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
11433                 oils_persist:tablename="config.filter_dialog_filter_set"
11434                 reporter:label="FilterDialog Filter Set">
11435                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
11436                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11437                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11438                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11439                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11440                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
11441                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11442                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
11443                 </fields>
11444                 <links>
11445                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11446                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11447                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
11448                 </links>
11449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11450                         <actions>
11451                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11452                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11453                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11454                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11455                         </actions>
11456                 </permacrud>
11457
11458         </class>
11459
11460         <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">
11461                 <fields oils_persist:primary="code">
11462                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
11463                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
11464                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
11465                 </fields>
11466                 <links/>
11467                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11468                         <actions>
11469                                 <retrieve/>
11470                         </actions>
11471                 </permacrud>
11472         </class>
11473
11474         <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">
11475                 <oils_persist:source_definition>
11476
11477             SELECT  b.id,
11478                     MAX(dcp.edit_date) AS last_delete_date
11479              FROM   biblio.record_entry b
11480                     JOIN asset.call_number cn ON (cn.record = b.id)
11481                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
11482              WHERE  NOT b.deleted
11483              GROUP BY b.id
11484              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
11485
11486                 </oils_persist:source_definition>
11487                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11488                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11489                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
11490                 </fields>
11491                 <links>
11492                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11493                 </links>
11494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11495                         <actions>
11496                                 <retrieve/>
11497                         </actions>
11498                 </permacrud>
11499         </class>
11500
11501         <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">
11502                 <oils_persist:source_definition>
11503
11504             -- -- 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.
11505             -- -- 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
11506             -- -- may not.
11507             -- SELECT
11508             --     bre.id AS bib_id,
11509             --     COALESCE( z.copy_count, 0 ) AS copy_count,
11510             --     COALESCE( z.hold_count, 0 ) AS hold_count,
11511             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
11512             -- FROM (
11513                 SELECT
11514                     y.bre AS id,
11515                     COALESCE( x.copy_count, 0 ) AS copy_count,
11516                     y.hold_count AS hold_count,
11517                     (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
11518                 FROM (
11519                         SELECT
11520                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
11521                             COUNT(*) AS hold_count
11522                         FROM action.hold_request h
11523                         WHERE
11524                             cancel_time IS NULL
11525                             AND fulfillment_time IS NULL
11526                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
11527                         GROUP BY 1
11528                     )y LEFT JOIN (
11529                         SELECT 
11530                             (SELECT id
11531                                 FROM biblio.record_entry 
11532                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
11533                             ) AS bre, 
11534                             COUNT(*) AS copy_count
11535                         FROM asset.copy
11536                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
11537                         WHERE copy.holdable 
11538                             AND NOT copy.deleted 
11539                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
11540                         GROUP BY 1
11541                     )x ON x.bre = y.bre
11542                 -- )z RIGHT JOIN (
11543                 --     SELECT id
11544                 --     FROM biblio.record_entry
11545                 --     WHERE NOT deleted
11546                 -- )bre ON (z.bib_id = bre.id)
11547                 
11548
11549                 </oils_persist:source_definition>
11550                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11551                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11552                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
11553                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
11554                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
11555                 </fields>
11556                 <links>
11557                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11558                 </links>
11559                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11560                         <actions>
11561                                 <retrieve/>
11562                         </actions>
11563                 </permacrud>
11564         </class>
11565
11566         <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">
11567                 <oils_persist:source_definition>
11568             SELECT *,
11569                 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,
11570                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
11571             FROM
11572                 (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
11573                     FROM
11574                         action.hold_request ahr
11575                         JOIN reporter.hold_request_record rhrr USING (id)
11576                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11577                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
11578                     WHERE
11579                         ahr.cancel_time IS NULL
11580                         AND ahr.fulfillment_time IS NULL
11581                     GROUP BY bib_record, pickup_lib
11582                 )x
11583                 JOIN
11584                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11585                     FROM
11586                         action.hold_request ahr
11587                         JOIN reporter.hold_request_record rhrr USING (id)
11588                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11589                     WHERE
11590                         ahr.cancel_time IS NULL
11591                         AND ahr.fulfillment_time IS NULL
11592                     GROUP BY bib_record
11593                 )y
11594                 USING (id)
11595                 </oils_persist:source_definition>
11596                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11597                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11598                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
11599                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
11600                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
11601                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11602                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11603                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
11604                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11605                 </fields>
11606                 <links>
11607                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11608                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
11609                 </links>
11610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11611                         <actions>
11612                                 <retrieve/>
11613                         </actions>
11614                 </permacrud>
11615         </class>
11616
11617         <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) ">
11618                 <oils_persist:source_definition>
11619             WITH counts_at_ou AS (
11620                 SELECT  rhrr.bib_record AS id,
11621                         aou.id AS pickup_lib_or_desc,
11622                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
11623                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
11624                   FROM  actor.org_unit aou
11625                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
11626                         action.hold_request ahr
11627                         JOIN reporter.hold_request_record rhrr USING (id)
11628                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11629                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
11630                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
11631                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
11632                         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
11633                   GROUP BY 1, 2
11634             )
11635             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
11636                    y.holds_everywhere, y.copy_count_everywhere,
11637                 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,
11638                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
11639             FROM counts_at_ou x
11640                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11641                     FROM
11642                         action.hold_request ahr
11643                         JOIN reporter.hold_request_record rhrr USING (id)
11644                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11645                     WHERE
11646                         ahr.cancel_time IS NULL
11647                         AND ahr.fulfillment_time IS NULL
11648                     GROUP BY bib_record
11649                 )y
11650                 USING (id)
11651                 </oils_persist:source_definition>
11652                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11653                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11654                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
11655                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
11656                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
11657                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11658                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11659                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
11660                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11661                 </fields>
11662                 <links>
11663                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11664                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
11665                 </links>
11666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11667                         <actions>
11668                                 <retrieve/>
11669                         </actions>
11670                 </permacrud>
11671         </class>
11672
11673         <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">
11674                 <oils_persist:source_definition>
11675             SELECT
11676                 ac.id,
11677                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
11678                 MAX(actac.xact_start) AS last_circ
11679             FROM asset.copy ac
11680                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11681             GROUP BY ac.id
11682
11683             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
11684             --SELECT
11685             --    ac.id,
11686             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
11687             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
11688             --FROM asset.copy ac
11689             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11690             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
11691             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
11692                 </oils_persist:source_definition>
11693                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11694                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
11695                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
11696                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
11697                 </fields>
11698                 <links>
11699                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11700                 </links>
11701                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11702                         <actions>
11703                                 <retrieve/>
11704                         </actions>
11705                 </permacrud>
11706         </class>
11707
11708         <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">
11709                 <fields oils_persist:primary="id">
11710                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
11711                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
11712                 </fields>
11713                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11714                         <actions>
11715                                 <retrieve/>
11716                         </actions>
11717                 </permacrud>
11718         </class>
11719
11720         <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">
11721                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
11722                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11723                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
11724                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11725                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11726                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11727                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11728                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11729                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
11730                 </fields>
11731                 <links>
11732                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
11733                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11734                 </links>
11735                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11736                         <actions>
11737                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11738                                 <retrieve/>
11739                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11740                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11741                         </actions>
11742                 </permacrud>
11743         </class>
11744
11745         <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">
11746                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
11747                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11748                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
11749                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11750                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11751                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11752                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11753                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11754                 </fields>
11755                 <links>
11756                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
11757                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11758                 </links>
11759                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11760                         <actions>
11761                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11762                                 <retrieve/>
11763                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11764                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11765                         </actions>
11766                 </permacrud>
11767         </class>
11768
11769
11770         <!-- ********************************************************************************************************************* -->
11771         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
11772         <!-- ********************************************************************************************************************* -->
11773         <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">
11774                 <fields oils_persist:primary="id">
11775                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
11776                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
11777                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
11778                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11779                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
11780                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
11781                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11782                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
11783                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
11784                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
11785                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
11786                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
11787                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
11788                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
11789                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11790                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
11791                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
11792                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
11793                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
11794                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
11795                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
11796                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
11797                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
11798                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
11799                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
11800                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
11801                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
11802                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
11803                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
11804                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11805                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11806                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11807                 </fields>
11808                 <links>
11809                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11810                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
11811                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
11812                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
11813                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
11814                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
11815                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
11816                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
11817                 </links>
11818         </class>
11819
11820         <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">
11821                 <fields oils_persist:primary="id">
11822                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11823                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11824                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11825                 </fields>
11826                 <links>
11827                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11828                 </links>
11829         </class>
11830
11831         <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">
11832                 <fields oils_persist:primary="id">
11833                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11834                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11835                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11836                 </fields>
11837                 <links>
11838                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11839                 </links>
11840         </class>
11841
11842         <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">
11843                 <fields oils_persist:primary="id">
11844                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
11845
11846                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
11847                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
11848                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
11849
11850                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
11851                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
11852                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
11853
11854                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
11855                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
11856
11857                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11858                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
11859                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
11860
11861                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
11862                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
11863
11864                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
11865                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
11866                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
11867
11868                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
11869                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
11870                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
11871
11872                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11873                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
11874                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
11875                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
11876
11877                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
11878                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
11879
11880                 </fields>
11881                 <links>
11882                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
11883                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11884                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
11885                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
11886                 </links>
11887         </class>
11888
11889         <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">
11890                 <oils_persist:source_definition>
11891
11892             SELECT
11893                 po.ordering_agency AS ordering_agency,
11894                 po.id AS purchase_order,
11895                 li.id AS lineitem,
11896                 lid.id AS lineitem_detail,
11897                 cpa.id AS claim_policy_action
11898             FROM
11899                 acq.lineitem_detail lid
11900                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
11901                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
11902                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
11903                 JOIN acq.claim_policy_action cpa ON (
11904                     cpa.claim_policy = cp.id
11905
11906                     -- we only care about claim policy actions whose claim
11907                     -- interval we'd reached or exceeded
11908                     AND (NOW() - cpa.action_interval) &gt; po.order_date
11909
11910                     -- filter out all claim policy actions where claim events
11911                     -- have occurred on or after the action's action_interval
11912                     AND NOT EXISTS (
11913                         SELECT 1
11914                         FROM
11915                             acq.claim_event evt
11916                             JOIN acq.claim claim ON (
11917                                 claim.id = evt.claim
11918                                 AND claim.lineitem_detail = lid.id
11919                             )
11920                         WHERE
11921                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
11922                     )
11923                 )
11924             WHERE
11925                 lid.cancel_reason IS NULL
11926                 AND li.cancel_reason IS NULL -- belt/suspenders
11927                 AND po.cancel_reason IS NULL -- belt/suspenders
11928                 AND lid.recv_time IS NULL
11929                 AND po.state = 'on-order'
11930             ORDER BY 1, 2, 3, 4, 5
11931
11932                 </oils_persist:source_definition>
11933                 <fields>
11934                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
11935                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
11936                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11937                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11938                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
11939                 </fields>
11940                 <links>
11941                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
11942                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
11943                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11944                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11945                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
11946                 </links>
11947         </class>
11948         <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">
11949                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11950                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11951                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11952                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11953                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11954                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11955                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11956                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11957                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11958                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11959                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11960                 </fields>
11961                 <links>
11962                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11963                 </links>
11964     </class>
11965         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
11966                 <oils_persist:source_definition>
11967             SELECT * FROM acq.lineitem_summary 
11968                                 WHERE item_count > (invoice_count + cancel_count)
11969         </oils_persist:source_definition>
11970                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11971                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11972                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11973                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11974                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11975                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11976                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11977                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11978                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11979                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11980                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11981                 </fields>
11982                 <links>
11983                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11984                 </links>
11985     </class>
11986         <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">
11987                 <oils_persist:source_definition>
11988
11989                         SELECT  t.*
11990                           FROM  action.transit_copy t
11991                                 JOIN actor.org_unit AS s ON (t.source = s.id)
11992                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
11993                           WHERE s.parent_ou &lt;&gt; d.parent_ou
11994
11995                 </oils_persist:source_definition>
11996                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
11997                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
11998                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
11999                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
12000                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
12001                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
12002                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
12003                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
12004                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
12005                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
12006                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
12007                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
12008                 </fields>
12009                 <links>
12010                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
12011                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
12012                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
12013                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
12014                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12015                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
12016                 </links>
12017         </class>
12018
12019     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
12020                 <oils_persist:source_definition>
12021
12022         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
12023                 SELECT
12024                         cp.id as copy,
12025                         COUNT(circ.id),
12026                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12027                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
12028                 FROM
12029                         asset.copy cp
12030                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
12031                 GROUP BY 1, 3, 4
12032                 UNION ALL
12033                 SELECT
12034                         cp.id as copy,
12035                         COUNT(circ.id),
12036                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12037                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
12038                 FROM
12039                         asset.copy cp
12040                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
12041                 GROUP BY 1, 3, 4
12042                 UNION ALL
12043                 SELECT
12044                         id as copy,
12045                         circ_count,
12046                         -1 AS year,
12047                         false as is_renewal
12048                 FROM
12049                         extend_reporter.legacy_circ_count
12050         )x GROUP BY 1, 3, 4
12051
12052                 </oils_persist:source_definition>
12053         <fields>
12054             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
12055             <field reporter:label="Count" name="count" reporter:datatype="int"/>
12056             <field reporter:label="Year" name="year" reporter:datatype="int"/>
12057             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
12058         </fields>
12059                 <links>
12060                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12061                 </links>
12062                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12063                         <actions>
12064                                 <retrieve/>
12065                         </actions>
12066                 </permacrud>
12067     </class>
12068
12069         <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">
12070                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
12071                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
12072                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
12073                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
12074                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
12075                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
12076                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
12077                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
12078                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
12079                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
12080                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
12081                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
12082                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
12083                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
12084                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
12085                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
12086                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
12087                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
12088                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
12089                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
12090                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
12091                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
12092                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
12093                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
12094                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
12095                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
12096                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
12097                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
12098                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
12099                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
12100                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
12101                 </fields>
12102                 <links>
12103                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
12104                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
12105                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
12106                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12107                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
12108                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12109                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12110                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
12111                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
12112                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
12113                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
12114                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
12115                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
12116                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
12117                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
12118                 </links>
12119         </class>
12120
12121     <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">
12122         <fields oils_persist:primary="id">
12123             <field reporter:label="Title" name="title" reporter:datatype="text"/>
12124             <field reporter:label="Author" name="author" reporter:datatype="text"/>
12125             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
12126             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12127             <field reporter:label="Price" name="price" reporter:datatype="money"/>
12128             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
12129             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
12130             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
12131             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12132             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
12133             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12134             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
12135             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
12136             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
12137             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12138             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12139             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
12140             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
12141             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
12142             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
12143             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
12144             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
12145             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12146             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
12147             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
12148             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
12149             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
12150             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
12151             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
12152             <field reporter:label="Status" name="status" reporter:datatype="link"/>
12153             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
12154             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
12155             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
12156             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
12157         </fields>
12158         <links>
12159             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12160             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12161             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12162             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12163             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
12164             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
12165             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
12166             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
12167         </links>
12168     </class>
12169
12170     <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">
12171         <fields oils_persist:primary="id">
12172             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12173             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12174             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12175             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12176         </fields>
12177         <links>
12178             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12179             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12180         </links>
12181     </class>
12182
12183     <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">
12184         <fields oils_persist:primary="owning_lib">
12185             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12186             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12187             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12188         </fields>
12189         <links>
12190             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12191         </links>
12192     </class>
12193
12194     <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">
12195         <fields oils_persist:primary="id">
12196             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12197             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12198             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12199             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12200             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12201         </fields>
12202         <links>
12203             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12204             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12205             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12206         </links>
12207     </class>
12208
12209     <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">
12210         <fields oils_persist:primary="circ_lib">
12211             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12212             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12213             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12214             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12215         </fields>
12216         <links>
12217             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12218             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12219         </links>
12220     </class>
12221
12222     <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">
12223         <fields oils_persist:primary="id">
12224             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12225             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12226             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12227             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12228             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12229         </fields>
12230         <links>
12231             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12232             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12233             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12234         </links>
12235     </class>
12236
12237     <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">
12238         <fields oils_persist:primary="home_ou">
12239             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12240             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12241             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12242             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12243         </fields>
12244         <links>
12245             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12246             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12247         </links>
12248     </class>
12249         <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">
12250                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
12251                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
12252                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
12253                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
12254                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
12255                 </fields>
12256                 <links>
12257                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12258                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
12259                 </links>
12260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12261                         <actions>
12262                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12263                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
12264                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12265                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12266                         </actions>
12267                 </permacrud>
12268         </class>
12269         <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">
12270                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
12271                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
12272                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
12273                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
12274                 </fields>
12275                 <links>
12276                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
12277                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
12278                         </links>
12279                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12280                 <actions>
12281                                 <create permission="ADMIN_ACQ_FUND_TAG">
12282                                         <context link="tag" field="owner"/>
12283                                 </create>
12284                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
12285                                         <context link="tag" field="owner"/>
12286                                 </retrieve>
12287                                 <update permission="ADMIN_ACQ_FUND_TAG">
12288                                         <context link="tag" field="owner"/>
12289                                 </update>
12290                                 <delete permission="ADMIN_ACQ_FUND_TAG">
12291                                         <context link="tag" field="owner"/>
12292                                 </delete>
12293                         </actions>
12294                 </permacrud>
12295         </class>
12296         <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">
12297                 <oils_persist:source_definition><![CDATA[
12298                 SELECT
12299                         poi.purchase_order AS purchase_order,
12300                         ii.invoice AS invoice,
12301                         NULL AS lineitem,
12302                         poi.id AS po_item,
12303                         NULL AS picklist
12304                 FROM
12305                         acq.po_item poi
12306                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
12307                 UNION SELECT
12308                         jub.purchase_order AS purchase_order,
12309                         ie.invoice AS invoice,
12310                         jub.id AS lineitem,
12311                         NULL AS po_item,
12312                         jub.picklist AS picklist
12313                 FROM
12314                         acq.lineitem jub
12315                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
12316                 UNION SELECT
12317                         ii.purchase_order AS purchase_order,
12318                         ii.invoice AS invoice,
12319                         NULL AS lineitem,
12320                         NULL AS po_item,
12321                         NULL AS picklist
12322                 FROM
12323                         acq.invoice_item ii
12324                 WHERE ii.po_item IS NULL
12325                 UNION SELECT
12326                         ie.purchase_order AS purchase_order,
12327                         ie.invoice AS invoice,
12328                         NULL AS lineitem,
12329                         NULL AS po_item,
12330                         NULL AS picklist
12331                 FROM
12332                         acq.invoice_entry ie
12333                 WHERE ie.lineitem IS NULL
12334                 UNION SELECT
12335                         NULL AS purchase_order,
12336                         NULL AS invoice,
12337                         jub.id AS lineitem,
12338                         NULL AS po_item,
12339                         jub.picklist AS picklist
12340                 FROM
12341                         acq.lineitem jub
12342                 WHERE jub.purchase_order IS NULL
12343                 ]]></oils_persist:source_definition>
12344                 <fields>
12345                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
12346                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
12347                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
12348                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
12349                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
12350                 </fields>
12351                 <links>
12352                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
12353                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
12354                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
12355                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
12356                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
12357                 </links>
12358         </class>
12359         <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">
12360                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
12361                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12362                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
12363                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
12364                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
12365                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
12366                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12367                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
12368                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
12369                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
12370                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
12371                 </fields>
12372                 <links>
12373                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
12374                 </links>
12375                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12376                         <actions>
12377                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12378                                 <retrieve/>
12379                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12380                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12381                         </actions>
12382                 </permacrud>
12383         </class>
12384
12385         <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">
12386                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
12387                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12388                         <field name="date_applied" reporter:datatype="timestamp"/>
12389                         <field name="org" reporter:datatype="org_unit"/>
12390                         <field name="original_value" reporter:datatype="text"/>
12391                         <field name="new_value" reporter:datatype="text"/>
12392                         <field name="field_name" reporter:datatype="link"/>
12393                 </fields>
12394                 <links>
12395                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
12396                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
12397                 </links>
12398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12399                         <actions>
12400                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
12401                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
12402                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12403                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12404                         </actions>
12405                 </permacrud>
12406         </class>
12407         <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">
12408                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12409                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12410                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12411                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12412                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12413                 </fields>
12414                 <links>
12415                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12416                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
12417                 </links>
12418         </class>
12419         <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">
12420                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12421                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12422                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12423                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12424                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12425                 </fields>
12426                 <links>
12427                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12428                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
12429                 </links>
12430         </class>
12431         <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">
12432                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
12433                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
12434                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
12435                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
12436                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
12437                 </fields>
12438                 <links>
12439                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
12440                 </links>
12441                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12442                         <actions>
12443                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12444                                 <retrieve/>
12445                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12446                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12447                         </actions>
12448                 </permacrud>
12449         </class>
12450         <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">
12451                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
12452                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12453                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
12454                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
12455                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
12456                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
12457                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
12458                 </fields>
12459                 <links>
12460                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
12461                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
12462                 </links>
12463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12464                         <actions>
12465                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12466                                 <retrieve/>
12467                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12468                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12469                         </actions>
12470                 </permacrud>
12471         </class>
12472         <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">
12473                 <fields oils_persist:primary="code">
12474                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
12475                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
12476                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12477                 </fields>
12478                 <links>
12479                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12480                 </links>
12481                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12482                         <actions>
12483                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12484                                 <retrieve/>
12485                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12486                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12487                         </actions>
12488                 </permacrud>
12489         </class>
12490         <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">
12491                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
12492                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12493                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
12494                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12495                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12496                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
12497                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
12498                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12499                 </fields>
12500                 <links>
12501                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
12502                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12503                 </links>
12504                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12505                         <actions>
12506                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
12507                                 <retrieve/>
12508                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
12509                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
12510                         </actions>
12511                 </permacrud>
12512         </class>
12513         <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">
12514                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
12515                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12516                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
12517                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
12518                 </fields>
12519                 <links>
12520                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12521                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
12522                 </links>
12523                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12524                         <actions>
12525                                 <create permission="UPDATE_COPY">
12526                     <context link="copy" field="circ_lib"/>
12527                 </create>
12528                                 <retrieve/>
12529                                 <update permission="UPDATE_COPY">
12530                     <context link="copy" field="circ_lib"/>
12531                 </update>
12532                                 <delete permission="UPDATE_COPY">
12533                     <context link="copy" field="circ_lib"/>
12534                 </delete>
12535                         </actions>
12536                 </permacrud>
12537         </class>
12538         <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">
12539         <oils_persist:source_definition>
12540         SELECT ahcm.target_copy AS id,count(*) AS count
12541          FROM
12542          action.hold_request ahr,
12543          action.hold_copy_map ahcm
12544          WHERE
12545          ahr.cancel_time IS NULL AND
12546          ahr.fulfillment_time IS NULL AND
12547          ahr.capture_time IS NULL AND
12548          ahr.id = ahcm.hold
12549          GROUP BY ahcm.target_copy
12550         </oils_persist:source_definition>
12551         <fields oils_persist:primary="id">
12552             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12553             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
12554         </fields>
12555         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12556             <actions>
12557                <retrieve/>
12558             </actions>
12559         </permacrud>
12560         </class>
12561
12562         <class id="cwst" controller="open-ils.cstore open-ils.pcrud"
12563                 oils_obj:fieldmapper="config::workstation_setting_type" 
12564                 oils_persist:tablename="config.workstation_setting_type" 
12565                 reporter:label="Workstation Setting Type">
12566                 <fields oils_persist:primary="name">
12567                         <field name="name" reporter:datatype="text"/>
12568                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
12569                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
12570                         <field name="datatype" reporter:datatype="text"/>
12571                         <field name="fm_class" reporter:datatype="text"/>
12572                         <field name="grp" reporter:datatype="link"/>
12573                 </fields>
12574                 <links>
12575                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
12576                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
12577                 </links>
12578                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12579                         <actions>
12580                                 <create permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12581                                 <retrieve/>
12582                                 <update permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12583                                 <delete permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12584                         </actions>
12585                 </permacrud>
12586         </class>
12587
12588         <!-- no pcrud access is granted for now, because it's assumed these
12589                          setting values will be applied and retrived via the API. -->
12590         <class id="awss" 
12591                 controller="open-ils.cstore"
12592                 oils_obj:fieldmapper="actor::workstation_setting" 
12593                 oils_persist:tablename="actor.workstation_setting" 
12594                 reporter:label="Workstation Setting">
12595                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_setting_id_seq">
12596                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
12597                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
12598                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12599                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
12600                 </fields>
12601                 <links>
12602                         <link field="name" reltype="has_a" key="name" map="" class="cwst"/>
12603                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
12604                 </links>
12605         </class>
12606
12607         <!-- ********************************************************************************************************************* -->
12608 </IDL>
12609
12610 <!--
12611     vim:noet:ts=4:sw=4:
12612 -->