]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
b21f7b3dbcdaa17daef08daa5bf128cf7b4ef261
[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="Keep" name="keep" reporter:datatype="bool"/>
424                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
425                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
426                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
427                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
428                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
429                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
430                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
431                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
432                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
433                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
434                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
435                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
436                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
437                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
438                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
439                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
440                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
441                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
442                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
443                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
444                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
445                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
446                 </fields>
447                 <links>
448                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
449                 </links>
450                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
451                         <actions>
452                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
453                                 <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"/>
454                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
456                         </actions>
457                 </permacrud>
458         </class>
459
460         <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">
461                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
462                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
463                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
464                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
465                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
466                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
467                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
468                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
469                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
470                 </fields>
471                 <links>
472                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
473                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
474                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
475                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
476                 </links>
477                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
478                         <actions>
479                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
480                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
481                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
482                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
483                         </actions>
484                 </permacrud>
485         </class>
486
487         <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">
488                 <fields oils_persist:primary="code">
489                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
490                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
491                 </fields>
492                 <links>
493                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
494                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
495                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
496                 </links>
497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
498                         <actions>
499                                 <retrieve/>
500                         </actions>
501                 </permacrud>
502         </class>
503
504         <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">
505                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
506                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
507                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
508                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
509                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
510                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
511                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
512                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
513                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
514                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
515                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
516                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
517                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
518                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
519                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
520                 </fields>
521                 <links>
522                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
523                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
524                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
525                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
526             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
527             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
528             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
529                 </links>
530                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
531                         <actions>
532                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
533                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
534                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
535                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
536                         </actions>
537                 </permacrud>
538         </class>
539
540         <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">
541                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
542                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
543                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
544                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
545                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
546                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
547                 </fields>
548                 <links/>
549                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
550                         <actions>
551                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
552                 <retrieve/>
553                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
554                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
555                         </actions>
556                 </permacrud>
557         </class>
558
559         <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">
560                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
561                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
562                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
563                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
564                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
565                 </fields>
566                 <links>
567                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
568                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
569                 </links>
570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
571                         <actions>
572                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
573                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
574                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
575                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
576                         </actions>
577                 </permacrud>
578         </class>
579
580         <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">
581                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
582                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
583                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
584                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
585                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
586                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
587                 </fields>
588                 <links>
589                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
590                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
591                 </links>
592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
593                         <actions>
594                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
595                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
596                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
597                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
598                         </actions>
599                 </permacrud>
600         </class>
601
602         <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">
603                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
604                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
605                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
606                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
607                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
608                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
609                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
610                 </fields>
611                 <links>
612                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
613                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
614                 </links>
615                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
616                         <actions>
617                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
621                         </actions>
622                 </permacrud>
623         </class>
624
625         <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">
626                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
627                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
628                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
629                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
630                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
631                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
632                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
633                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
634                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
635                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
636                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
637                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
638                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
639                 </fields>
640                 <links>
641                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
642                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
643                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
644             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
645             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
646                 </links>
647                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
648                         <actions>
649                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
650                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
651                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
653                         </actions>
654                 </permacrud>
655         </class>
656
657         <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">
658                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
659                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
660                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
661                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
662                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
663                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
664                 </fields>
665                 <links/>
666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
667                         <actions>
668                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
669                 <retrieve/>
670                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
672                         </actions>
673                 </permacrud>
674         </class>
675
676         <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">
677                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
678                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
679                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
680                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
681                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
682                 </fields>
683                 <links>
684                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
685                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
686                 </links>
687                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
688                         <actions>
689                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
690                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
691                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
693                         </actions>
694                 </permacrud>
695         </class>
696
697         <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">
698                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
699                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
700                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
701                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
702                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
703                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
704                 </fields>
705                 <links>
706                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
707                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
708                 </links>
709                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
710                         <actions>
711                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
712                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
713                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
715                         </actions>
716                 </permacrud>
717         </class>
718
719         <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">
720                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
721                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
722                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
723                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
724                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
725                 </fields>
726                 <links>
727                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
728                 </links>
729                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
730                         <actions>
731                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
732                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
733                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
735                         </actions>
736                 </permacrud>
737         </class>
738
739         <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">
740                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
741                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
742                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
743                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
744                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
745                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
746                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
747                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
748             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
749                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
750                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
751                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
752                 </fields>
753                 <links>
754                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
755                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
756                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
757                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
758                 </links>
759                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
760                         <actions>
761                                 <create permission="ADMIN_IMPORT_MATCH_SET">
762                     <context link="match_set" field="owner"/>
763                                 </create>
764                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
765                     <context link="match_set" field="owner"/>
766                                 </retrieve>
767                                 <update permission="ADMIN_IMPORT_MATCH_SET">
768                     <context link="match_set" field="owner"/>
769                                 </update>
770                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
771                     <context link="match_set" field="owner"/>
772                                 </delete>
773                         </actions>
774                 </permacrud>
775         </class>
776
777         <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">
778                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
779                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
780                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
781                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
782                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
783                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
784                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
785                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
786                 </fields>
787                 <links>
788                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
789                 </links>
790                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
791                         <actions>
792                                 <create permission="ADMIN_IMPORT_MATCH_SET">
793                     <context link="match_set" field="owner"/>
794                                 </create>
795                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
796                     <context link="match_set" field="owner"/>
797                                 </retrieve>
798                                 <update permission="ADMIN_IMPORT_MATCH_SET">
799                     <context link="match_set" field="owner"/>
800                                 </update>
801                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
802                     <context link="match_set" field="owner"/>
803                                 </delete>
804                         </actions>
805                 </permacrud>
806         </class>
807
808         <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">
809                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
810                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
811                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
812                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
813                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
814                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
815                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
816                 </fields>
817                 <links>
818                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
819                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
820                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
821                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
822                 </links>
823         </class>
824
825     <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">
826         <fields oils_persist:primary="name">
827             <field reporter:label="Name" name="name" reporter:datatype="text"/>
828             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
829             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
830             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
831         </fields>
832         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
833             <actions>
834                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
835                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
836                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
837                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
838             </actions>
839         </permacrud>
840     </class>
841
842     <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">
843         <fields oils_persist:primary="id">
844             <field reporter:label="ID" name="id" reporter:datatype="id"/>
845             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
846             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
847             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
848             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
849         </fields>
850         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
851             <actions>
852                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
853                 <retrieve/>
854                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
855                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
856             </actions>
857         </permacrud>
858     </class>
859
860         <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">
861                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
862                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
863                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
864                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
865                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
866                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
867                 </fields>
868                 <links>
869                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
870                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
871                 </links>
872         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
873             <actions>
874                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
875                 <retrieve/>
876                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
877                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
878             </actions>
879         </permacrud>
880         </class>
881
882         <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">
883                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
884                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
885                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
886                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
887         </fields>
888         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
889             <actions>
890                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
891                 <retrieve/>
892                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
893                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
894             </actions>
895         </permacrud>
896         </class>
897
898         <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">
899                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
900                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
901                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
902                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
903                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
904                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
905                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
906                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
907                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
908                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
909                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
910                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
911         </fields>
912                 <links>
913                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
914                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
915         </links>
916         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
917             <actions>
918                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
919                 <retrieve/>
920                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
921                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
922             </actions>
923         </permacrud>
924         </class>
925
926         <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">
927                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
928                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
929                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
930                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
931                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
932                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
933                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
934                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
935                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
936                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
937                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
938         </fields>
939                 <links>
940                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
941                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
942         </links>
943         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
944             <actions>
945                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
946                 <retrieve/>
947                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
948                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
949             </actions>
950         </permacrud>
951         </class>
952
953         <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">
954                 <fields oils_persist:primary="name">
955                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
956                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
957                         <field reporter:label="Description" name="description" reporter:datatype="text" />
958                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
959                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
960                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
961                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
962                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
963                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
964                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
965                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
966                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
967                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
968                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
969                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
970                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
971                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
972                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
973                 </fields>
974                 <links>
975                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
976                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
977                 </links>
978         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
979             <actions>
980                 <create permission="ADMIN_SVF" global_required="true"/>
981                 <retrieve/>
982                 <update permission="ADMIN_SVF" global_required="true"/>
983                 <delete permission="ADMIN_SVF" global_required="true"/>
984             </actions>
985         </permacrud>
986         </class>
987
988         <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">
989                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
990                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
991                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
992                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
993             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
994                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
995                 </fields>
996                 <links/>
997         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
998             <actions>
999                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
1000                 <retrieve/>
1001                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1002                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1003             </actions>
1004         </permacrud>
1005         </class>
1006
1007         <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">
1008                 <fields oils_persist:primary="coded_value">
1009                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1010                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1011                 </fields>
1012                 <links>
1013                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1014                 </links>
1015         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1016             <actions>
1017                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1018                 <retrieve/>
1019                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1020                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1021             </actions>
1022         </permacrud>
1023         </class>
1024
1025         <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">
1026                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1027                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1028                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1029                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1030                 </fields>
1031                 <links>
1032                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1033                 </links>
1034         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1035             <actions>
1036                 <retrieve/>
1037             </actions>
1038         </permacrud>
1039         </class>
1040
1041
1042         <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">
1043                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1044                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1045                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1046                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1047                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1048                 </fields>
1049                 <links>
1050                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1051                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1052                 </links>
1053         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1054             <actions>
1055                 <retrieve/>
1056             </actions>
1057         </permacrud>
1058         </class>
1059
1060
1061         <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">
1062                 <fields oils_persist:primary="source">
1063                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1064                         <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 -->
1065                 </fields>
1066                 <links>
1067                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1068                 </links>
1069         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1070             <actions>
1071                 <retrieve/>
1072             </actions>
1073         </permacrud>
1074         </class>
1075
1076         <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">
1077                 <fields>
1078                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1079                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1080                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1081                 </fields>
1082                 <links>
1083                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1084                 </links>
1085         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1086             <actions>
1087                 <retrieve/>
1088             </actions>
1089         </permacrud>
1090         </class>
1091
1092         <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">
1093                 <fields oils_persist:primary="id">
1094                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1095                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1096                 </fields>
1097                 <links>
1098                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1099                 </links>
1100         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1101             <actions>
1102                 <retrieve/>
1103             </actions>
1104         </permacrud>
1105         </class>
1106
1107         <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">
1108                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1109                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1110                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1111                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1112                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1113                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1114                 </fields>
1115                 <links>
1116                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1117                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1118                 </links>
1119         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1120             <actions>
1121                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1122                 <retrieve/>
1123                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1124                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1125             </actions>
1126         </permacrud>
1127         </class>
1128
1129         <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">
1130                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1131                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1132                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1133                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1134                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1135                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1136                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1137                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1138             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1139             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1140             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1141                 </fields>
1142                 <links>
1143                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1144                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1145                 </links>
1146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1147             <actions>
1148                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1149                 <retrieve/>
1150                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1151                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1152             </actions>
1153         </permacrud>
1154         </class>
1155
1156         <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">
1157                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1158                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1159                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1160                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1161                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1162                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1163                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1164                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1165                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1166                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1167                 </fields>
1168                 <links>
1169                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1170                 </links>
1171         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1172             <actions>
1173                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1174                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1175                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1176                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1177             </actions>
1178         </permacrud>
1179         </class>
1180
1181     <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">
1182         <fields oils_persist:primary="name">
1183             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1184             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1185             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1186             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1187             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1188             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1189             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1190             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1191             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1192             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1193         </fields>
1194         <links>
1195             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1196             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1197         </links>
1198         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1199             <actions>
1200                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1201                 <retrieve/>
1202                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1203                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1204             </actions>
1205         </permacrud>
1206     </class>
1207
1208     <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">
1209         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1210             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1211             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1212             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1213             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1214             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1215             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1216             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1217         </fields>
1218         <links>
1219             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1220         </links>
1221         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1222             <actions>
1223                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1224                 <retrieve/>
1225                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1226                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1227             </actions>
1228         </permacrud>
1229     </class>
1230
1231     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1232                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1233                         oils_persist:tablename="config.z3950_index_field_map" 
1234                         reporter:label="Z39.50 Index Field Map">
1235         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1236             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1237             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1238             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1239             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1240             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1241             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1242         </fields>
1243         <links>
1244             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1245             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1246             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1247         </links>
1248         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1249             <actions>
1250                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1251                 <retrieve/>
1252                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1253                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1254             </actions>
1255         </permacrud>
1256     </class>
1257
1258
1259         <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">
1260                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1261                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1262                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1263                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1264                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1265                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1266                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1267                 </fields>
1268                 <links>
1269             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1270             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1271                 </links>
1272                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1273                         <actions>
1274                                 <retrieve/>
1275                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1276                         </actions>
1277                 </permacrud>
1278         </class>
1279
1280         <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">
1281                 <fields oils_persist:primary="key">
1282                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1283                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1284                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1285                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1286                 </fields>
1287                 <links/>
1288                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1289                         <actions>
1290                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1291                                 <retrieve/>
1292                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1293                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1294                         </actions>
1295                 </permacrud>
1296         </class>
1297
1298         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1299                 <fields oils_persist:primary="module">
1300                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1301                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1302                 </fields>
1303                 <links/>
1304         </class>
1305
1306         <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">
1307                 <fields oils_persist:primary="module">
1308                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1309                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1310                 </fields>
1311                 <links/>
1312                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1313                         <actions>
1314                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1315                                 <retrieve/>
1316                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1317                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1318                         </actions>
1319                 </permacrud>
1320         </class>
1321
1322         <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">
1323                 <fields oils_persist:primary="module">
1324                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1325                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1326                 </fields>
1327                 <links/>
1328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1329                         <actions>
1330                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1331                                 <retrieve/>
1332                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1333                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1334                         </actions>
1335                 </permacrud>
1336         </class>
1337
1338         <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">
1339                 <fields oils_persist:primary="module">
1340                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1341                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1342                 </fields>
1343                 <links/>
1344                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1345                         <actions>
1346                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1347                                 <retrieve/>
1348                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1349                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1350                         </actions>
1351                 </permacrud>
1352         </class>
1353
1354         <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">
1355                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1356                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1357                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1358                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1359                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1360                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1361                 </fields>
1362                 <links>
1363                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1364                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1365                 </links>
1366                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1367                         <actions>
1368                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1369                     <context link="event_def" field="owner"/>
1370                 </create>
1371                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1372                     <context link="event_def" field="owner"/>
1373                 </retrieve>
1374                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1375                     <context link="event_def" field="owner"/>
1376                 </update>
1377                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1378                     <context link="event_def" field="owner"/>
1379                 </delete>
1380                         </actions>
1381                 </permacrud>
1382         </class>
1383
1384         <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">
1385                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1386                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1387                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1388                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1389                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1390                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1391                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1392                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1393                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1394                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1395                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1396                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1397                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1398                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1399                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1400                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1401                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1402                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1403                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1404                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1405                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1406                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1407                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1408                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1409                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1410                 </fields>
1411                 <links>
1412                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1413                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1414                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1415                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1416                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1417                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1418                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1419                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1420                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1421                 </links>
1422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1423                         <actions>
1424                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1425                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1426                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1427                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1428                         </actions>
1429                 </permacrud>
1430         </class>
1431
1432         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1433                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1434                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1435                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1436                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1437                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1438                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1439                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1440                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1441                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1442                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1443                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1444                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1445                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1446                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1447                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1448                 </fields>
1449                 <links>
1450                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1451                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1452                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1453                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1454                 </links>
1455         </class>
1456
1457         <class id="atevparam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_param" oils_persist:tablename="action_trigger.event_params" reporter:label="Trigger Event Parameter">
1458                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1459                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1460                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1461                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1462                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1463                 </fields>
1464                 <links>
1465                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1466                 </links>
1467                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1468                         <actions>
1469                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1470                     <context link="event_def" field="owner"/>
1471                 </create>
1472                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1473                     <context link="event_def" field="owner"/>
1474                 </retrieve>
1475                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1476                     <context link="event_def" field="owner"/>
1477                 </update>
1478                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1479                     <context link="event_def" field="owner"/>
1480                 </delete>
1481                         </actions>
1482                 </permacrud>
1483         </class>
1484
1485         <class id="atul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::user_log" reporter:label="Action Trigger User Log" oils_persist:readonly="true">
1486                 <oils_persist:source_definition><![CDATA[
1487                 SELECT  atevdef.hook,
1488                         atevdef.name,
1489                         atevdef.reactor,
1490                         atev.id,
1491                         atev.event_def,
1492                         atev.add_time,
1493                         atev.run_time,
1494                         atev.start_time,
1495                         atev.update_time,
1496                         atev.complete_time,
1497                         atev.update_process,
1498                         atev.state,
1499                         atev.user_data,
1500                         atev.template_output,
1501                         atev.error_output,
1502                         atev.async_output,
1503                         targ_circ.id AS target_circ,
1504                         targ_ahr.id AS target_hold,
1505                         COALESCE(
1506                                 targ_circ.circ_lib,
1507                                 targ_ahr.pickup_lib
1508                         ) AS perm_lib
1509                 FROM action_trigger.event atev
1510                 JOIN action_trigger.event_definition atevdef ON
1511                         (atevdef.id = atev.event_def)
1512                 JOIN action_trigger.hook ath ON
1513                         (ath.key = atevdef.hook)
1514                 LEFT JOIN action.circulation targ_circ ON
1515                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1516                 LEFT JOIN action.hold_request targ_ahr ON
1517                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1518                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1519                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1520                                 'circ.staff.max_visible_event_age',
1521                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1522                         ) UNION
1523                         SELECT '1000 YEARS'::INTERVAL AS value
1524                 ) ous)
1525                 ]]></oils_persist:source_definition>
1526                 <fields oils_persist:primary="id">
1527                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1528                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1529                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1530                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1531                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1532                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1533                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1534                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1535                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1536                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1537                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1538                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1539                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1540                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1541                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1542                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1543                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1544                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1545                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1546                 </fields>
1547                 <links>
1548                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1549                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1550                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1551                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1552                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1553                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1554                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1555                 </links>
1556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1557                         <actions>
1558                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1559                         </actions>
1560                 </permacrud>
1561         </class>
1562
1563         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1564                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1565                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1566                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1567                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1568                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1569                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1570                 </fields>
1571                 <links>
1572                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1573                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1574                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1575                 </links>
1576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1577                         <actions>
1578                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1579                         </actions>
1580                 </permacrud>
1581         </class>
1582
1583         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
1584                 <fields oils_persist:primary="code">
1585                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1586                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1587                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1588                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1589                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1590                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1591                 </fields>
1592                 <links/>
1593         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1594             <actions>
1595                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1596                 <retrieve/>
1597                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1598                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1599             </actions>
1600         </permacrud>
1601         </class>
1602
1603         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
1604                 <fields oils_persist:primary="code">
1605                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1606                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1607                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1608                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1609                 </fields>
1610                 <links/>
1611         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1612             <actions>
1613                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1614                 <retrieve/>
1615                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1616                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1617             </actions>
1618         </permacrud>
1619         </class>
1620
1621         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
1622                 <fields oils_persist:primary="code">
1623                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1624                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1625                 </fields>
1626                 <links/>
1627         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1628             <actions>
1629                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1630                 <retrieve/>
1631                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1632                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1633             </actions>
1634         </permacrud>
1635         </class>
1636
1637         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
1638                 <fields oils_persist:primary="code">
1639                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1640                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1641                 </fields>
1642                 <links/>
1643         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1644             <actions>
1645                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1646                 <retrieve/>
1647                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1648                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1649             </actions>
1650         </permacrud>
1651         </class>
1652
1653         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
1654                 <fields oils_persist:primary="code">
1655                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1656                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1657                 </fields>
1658                 <links/>
1659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1660             <actions>
1661                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1662                 <retrieve/>
1663                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1664                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1665             </actions>
1666         </permacrud>
1667         </class>
1668
1669         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1670                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1671                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1672                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1673                 </fields>
1674                 <links/>
1675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1676             <actions>
1677                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1678                 <retrieve/>
1679                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1680                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1681             </actions>
1682         </permacrud>
1683         </class>
1684
1685         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1686                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1687                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1688                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1689                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1690                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1691                 </fields>
1692         <links>
1693             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1694             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1695             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1696         </links>
1697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1698             <actions>
1699                 <create permission="UPDATE_COPY">
1700                     <context link="target_copy" field="circ_lib"/>
1701                 </create>
1702                 <retrieve/>
1703                 <update permission="UPDATE_COPY">
1704                     <context link="target_copy" field="circ_lib"/>
1705                 </update>
1706                 <delete permission="UPDATE_COPY">
1707                     <context link="target_copy" field="circ_lib"/>
1708                 </delete>
1709             </actions>
1710         </permacrud>
1711         </class>
1712
1713         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
1714                 <fields oils_persist:primary="code">
1715                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1716                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1717                 </fields>
1718                 <links/>
1719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1720             <actions>
1721                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1722                 <retrieve/>
1723                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1724                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1725             </actions>
1726         </permacrud>
1727         </class>
1728
1729         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
1730                 <fields oils_persist:primary="code">
1731                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1732                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1733                 </fields>
1734                 <links/>
1735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1736             <actions>
1737                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1738                 <retrieve/>
1739                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1740                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1741             </actions>
1742         </permacrud>
1743         </class>
1744
1745         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
1746                 <fields oils_persist:primary="code">
1747                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1748                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1749                 </fields>
1750                 <links/>
1751         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1752             <actions>
1753                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1754                 <retrieve/>
1755                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1756                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1757             </actions>
1758         </permacrud>
1759         </class>
1760
1761     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1762         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1763             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1764             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1765             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1766             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1767             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1768             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1769             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1770             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1771             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1772             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1773             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1774             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1775             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1776             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1777             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1778             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1779             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1780         </fields>
1781         <links/>
1782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1783             <actions>
1784                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1785                 <retrieve/>
1786                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1787                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1788             </actions>
1789         </permacrud>
1790     </class>
1791
1792     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1793         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1794             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1795             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1796             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1797             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1798             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1799             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1800             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1801             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1802             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1803             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1804             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1805             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1806             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1807             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1808             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1809             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1810             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1811             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1812             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1813         </fields>
1814         <links/>
1815         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1816             <actions>
1817                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1818                 <retrieve/>
1819                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1820                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1821             </actions>
1822         </permacrud>
1823     </class>
1824
1825     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1826         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1827             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1828             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1829             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1830             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1831             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1832         </fields>
1833         <links>
1834             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1835             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1836             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1837         </links>
1838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1839             <actions>
1840                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1841                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1842                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1843                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1844             </actions>
1845         </permacrud>
1846     </class>
1847
1848         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
1849                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1850                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1851                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1852                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1853                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1854                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1855                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1856                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1857                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1858                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1859                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1860                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1861                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1862                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1863                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1864                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1865                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1866             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1867                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1868                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1869                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1870                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1871                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1872                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1873                 </fields>
1874                 <links>
1875                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1876                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1877                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1878                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1879                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1880                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1881                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1882                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1883                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1884                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1885                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1886                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1887                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1888             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1889                 </links>
1890         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1891             <actions>
1892                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1893                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1894                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1895                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1896             </actions>
1897         </permacrud>
1898         </class>
1899
1900         <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">
1901                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1902                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1903                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1904                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1905                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1906                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1907                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1908                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1909                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1910                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1911                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1912                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1913                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1914                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1915                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1916                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1917             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1918                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1919                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1920             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1921                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1922                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1923                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1924                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1925             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1926             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1927             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1928                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1929                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1930                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1931                 </fields>
1932                 <links>
1933                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1934                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1935                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1936                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1937                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1938                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1939                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1940                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1941                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1942                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1943                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1944                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1945                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1946                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1947             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1948                 </links>
1949         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1950             <actions>
1951                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1952                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1953                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1954                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1955             </actions>
1956         </permacrud>
1957         </class>
1958
1959     <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">
1960         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1961             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1962             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1963             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1964         </fields>
1965         <links/>
1966         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1967             <actions>
1968                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1969                 <retrieve/>
1970                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1971                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1972             </actions>
1973         </permacrud>
1974     </class>
1975
1976     <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">
1977         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1978             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1979             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1980             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1981             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1982             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1983             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1984             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1985         </fields>
1986         <links>
1987             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1988         </links>
1989         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1990             <actions>
1991                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1992                 <retrieve/>
1993                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1994                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1995             </actions>
1996         </permacrud>
1997     </class>
1998
1999     <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">
2000         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2001             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2002             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2003             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2004             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2005             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2006         </fields>
2007         <links>
2008             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2009             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2010         </links>
2011         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2012             <actions>
2013                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2014                     <context link="matchpoint" field="org_unit"/>
2015                 </create>
2016                 <retrieve/>
2017                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2018                     <context link="matchpoint" field="org_unit"/>
2019                 </update>
2020                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2021                     <context link="matchpoint" field="org_unit"/>
2022                 </delete>
2023             </actions>
2024         </permacrud>
2025     </class>
2026
2027     <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">
2028         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2029             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2030             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2031             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2032         </fields>
2033         <links>
2034             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2035             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2036         </links>
2037         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2038             <actions>
2039                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2040                     <context link="limit_set" field="owning_lib"/>
2041                 </create>
2042                 <retrieve/>
2043                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2044                     <context link="limit_set" field="owning_lib"/>
2045                 </update>
2046                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2047                     <context link="limit_set" field="owning_lib"/>
2048                 </delete>
2049             </actions>
2050         </permacrud>
2051     </class>
2052     <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">
2053         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2054             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2055             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2056             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2057         </fields>
2058         <links>
2059             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2060             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2061         </links>
2062         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2063             <actions>
2064                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2065                     <context link="limit_set" field="owning_lib"/>
2066                 </create>
2067                 <retrieve/>
2068                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2069                     <context link="limit_set" field="owning_lib"/>
2070                 </update>
2071                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2072                     <context link="limit_set" field="owning_lib"/>
2073                 </delete>
2074             </actions>
2075         </permacrud>
2076     </class>
2077
2078     <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">
2079         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2080             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2081             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2082             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2083             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2084         </fields>
2085         <links>
2086             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2087             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2088         </links>
2089         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2090             <actions>
2091                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2092                     <context link="limit_set" field="owning_lib"/>
2093                 </create>
2094                 <retrieve/>
2095                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2096                     <context link="limit_set" field="owning_lib"/>
2097                 </update>
2098                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2099                     <context link="limit_set" field="owning_lib"/>
2100                 </delete>
2101             </actions>
2102         </permacrud>
2103     </class>
2104
2105         <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">
2106                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2107                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2108                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2109                 </fields>
2110                 <links/>
2111         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2112             <actions>
2113                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2114                 <retrieve/>
2115                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2116                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2117             </actions>
2118         </permacrud>
2119         </class>
2120
2121         <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">
2122                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2123                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2124                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2125                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2126                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2127                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2128                 </fields>
2129                 <links>
2130                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2131                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2132                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2133                 </links>
2134         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2135             <actions>
2136                 <create permission="ADMIN_SURVEY">
2137                     <context link="survey" field="owner"/>
2138                 </create>
2139                 <retrieve/>
2140                 <update permission="ADMIN_SURVEY">
2141                     <context link="survey" field="owner"/>
2142                 </update>
2143                 <delete permission="ADMIN_SURVEY">
2144                     <context link="survey" field="owner"/>
2145                 </delete>
2146             </actions>
2147         </permacrud>
2148         </class>
2149         <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">
2150                 <fields oils_persist:primary="id" oils_persist:sequence="">
2151                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2152                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2153                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2154                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2155                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2156                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2157                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2158                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2159                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2160                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2161                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2162                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2163                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2164                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2165                 </fields>
2166                 <links>
2167                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2168                 </links>
2169                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2170                         <actions>
2171                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2172                                         <context link="usr" field="home_ou" />
2173                                 </retrieve>
2174                         </actions>
2175                 </permacrud>
2176         </class>
2177         <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">
2178                 <fields oils_persist:primary="id" oils_persist:sequence="">
2179                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2180                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2181                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2182                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2183                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2184                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2185                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2186                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2187                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2188                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2189                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2190                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2191                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2192                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2193                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2194                 </fields>
2195                 <links>
2196                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2197                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2198                 </links>
2199         </class>
2200         <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">
2201                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2202                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2203                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2204                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2205                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2206                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2207                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2208                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2209                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2210                 </fields>
2211                 <links>
2212                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2213                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2214                 </links>
2215                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2216                         <actions> <!-- created magically, so no create action -->
2217                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2218                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2219                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2220                         </actions>
2221                 </permacrud>
2222         </class>
2223         <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)">
2224                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2225                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2226                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2227                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2228                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2229                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2230                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2231                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2232                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2233                 </fields>
2234                 <links>
2235                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2236                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2237                 </links>
2238                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2239                         <actions> <!-- created magically, so no create action -->
2240                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2241                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2242                         </actions>
2243                 </permacrud>
2244         </class>
2245         <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">
2246                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2247                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2248                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2249                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2250                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2251                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2252                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2253                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2254                 </fields>
2255                 <links>
2256                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2257                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2258                 </links>
2259         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2260             <actions>
2261                 <create permission="UPDATE_USER" context_field="owner">
2262                     <context link="usr" field="home_ou"/>
2263                 </create>
2264                                 <!-- note: public notes are still accessible via API -->
2265                 <retrieve permission="UPDATE_USER">
2266                     <context link="usr" field="home_ou"/>
2267                                 </retrieve>
2268                 <update permission="UPDATE_USER">
2269                     <context link="usr" field="home_ou"/>
2270                                 </update>
2271                 <delete permission="UPDATE_USER">
2272                     <context link="usr" field="home_ou"/>
2273                                 </delete>
2274             </actions>
2275         </permacrud>
2276         </class>
2277         <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">
2278                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2279                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2280                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2281                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2282                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2283                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2284                 </fields>
2285                 <links>
2286                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2287                 </links>
2288         </class>
2289         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2290                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2291                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2292                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2293                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2294                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2295                 </fields>
2296                 <links>
2297                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2298                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2299                 </links>
2300         </class>
2301         <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">
2302                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2303                         <field name="field" reporter:datatype="link"/>
2304                         <field name="id" reporter:datatype="id" />
2305                         <field name="source" reporter:datatype="link"/>
2306                         <field name="value" reporter:datatype="text"/>
2307                 </fields>
2308                 <links>
2309                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2310                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2311                 </links>
2312         </class>
2313         <class id="aihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
2314                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2315                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2316                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2317                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2318                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2319                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2320                 </fields>
2321                 <links>
2322                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2323                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2324                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2325                 </links>
2326         </class>
2327         <class id="ancihu" controller="open-ils.cstore" 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">
2328                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2329                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2330                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2331                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2332                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2333                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2334                 </fields>
2335                 <links>
2336                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2337                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2338                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2339                 </links>
2340         </class>
2341         <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">
2342                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2343                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2344                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2345                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2346                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2347                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2348                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2349                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2350                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2351                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2352                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2353                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2354                 </fields>
2355                 <links>
2356                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2357                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2358                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2359                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2360                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2361                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2362                 </links>
2363         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2364             <actions>
2365                 <create permission="TRANSIT_COPY" context_field="owner">
2366                     <context link="target_copy" field="circ_lib"/>
2367                 </create>
2368                 <retrieve/>
2369                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2370                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2371             </actions>
2372         </permacrud>
2373         </class>
2374         <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">
2375                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2376                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2377                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2378                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2379                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2380                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2381                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2382                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2383                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2384                 </fields>
2385                 <links>
2386                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2387                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2388                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2389                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2390                 </links>
2391         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2392             <actions>
2393                 <create permission="ADMIN_SURVEY">
2394                     <context link="survey" field="owner"/>
2395                 </create>
2396                 <retrieve permission="VIEW_USER">
2397                     <context link="usr" field="home_ou"/>
2398                 </retrieve>
2399                 <update permission="ADMIN_SURVEY">
2400                     <context link="survey" field="owner"/>
2401                 </update>
2402                 <delete permission="ADMIN_SURVEY">
2403                     <context link="survey" field="owner"/>
2404                 </delete>
2405             </actions>
2406         </permacrud>
2407         </class>
2408         <class id="ccbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2409                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2410                         <field name="bucket" />
2411                         <field name="id" reporter:datatype="id" />
2412                         <field name="target_copy" reporter:datatype="link"/>
2413                         <field name="create_time" reporter:datatype="timestamp" />
2414                         <field name="pos" reporter:datatype="int" />
2415                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2416                 </fields>
2417                 <links>
2418                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2419                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2420             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2421                 </links>
2422         </class>
2423         <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">
2424                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2425                         <field name="id" reporter:datatype="id" />
2426                         <field name="item" reporter:datatype="link"/>
2427                         <field name="note" reporter:datatype="text" />
2428                 </fields>
2429                 <links>
2430                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2431                 </links>
2432         </class>
2433
2434         <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">
2435                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2436                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2437                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2438                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2439                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2440                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2441                 </fields>
2442                 <links>
2443                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2444                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2445                 </links>
2446                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2447                         <actions>
2448                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2449                                 <retrieve/>
2450                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2451                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2452                         </actions>
2453                 </permacrud>
2454         </class>
2455
2456         <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">
2457                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2458                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2459                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2460                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2461                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2462                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2463                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2464                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2465                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2466                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2467                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2468                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2469                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2470                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2471                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2472                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2473                 </fields>
2474                 <links>
2475                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2476                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2477                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2478                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2479                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2480                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2481                 </links>
2482                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2483                         <actions>
2484                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2485                                 <retrieve/>
2486                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2487                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2488                         </actions>
2489                 </permacrud>
2490         </class>
2491
2492         <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">
2493                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2494                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2495                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2496                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2497                 </fields>
2498                 <links>
2499                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2500                 </links>
2501                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2502                         <actions>
2503                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2504                                 <retrieve/>
2505                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2506                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2507                         </actions>
2508                 </permacrud>
2509         </class>
2510
2511         <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">
2512                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2513                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2514                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2515                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2516                 </fields>
2517                 <links>
2518                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2519                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2520                 </links>
2521                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2522                         <actions>
2523                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2524                                 <retrieve/>
2525                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2526                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2527                         </actions>
2528                 </permacrud>
2529         </class>
2530
2531         <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">
2532                 <fields oils_persist:primary="code">
2533                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2534                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2535                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2536                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2537                 </fields>
2538                 <links>
2539                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2540                 </links>
2541                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2542                         <actions>
2543                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2544                                 <retrieve/>
2545                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2546                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2547                         </actions>
2548                 </permacrud>
2549         </class>
2550
2551         <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">
2552                 <fields oils_persist:primary="code">
2553                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2554                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2555                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2556                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2557                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2558                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2559                 </fields>
2560                 <links>
2561                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2562                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2563                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
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="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">
2576         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2577             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2578             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2579             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2580         </fields>
2581         <links>
2582             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2583             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2584         </links>
2585         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2586             <actions>
2587                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2588                 <retrieve/>
2589                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2590                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2591             </actions>
2592         </permacrud>
2593     </class>
2594
2595         <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">
2596                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2597                         <field name="active" reporter:datatype="bool"/>
2598                         <field name="create_date" reporter:datatype="timestamp"/>
2599                         <field name="creator" />
2600                         <field name="deleted" reporter:datatype="bool"/>
2601                         <field name="edit_date" reporter:datatype="timestamp"/>
2602                         <field name="editor" />
2603                         <field name="id" reporter:datatype="id" />
2604                         <field name="last_xact_id" />
2605                         <field name="marc" />
2606                         <field name="source" />
2607                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2608                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2609                         <field name="heading" />
2610                         <field name="simple_heading" />
2611                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2612                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2613                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2614                 </fields>
2615                 <links>
2616                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2617                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2618                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2619                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2620                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2621                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2622                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2623                 </links>
2624                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2625                         <actions>
2626                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2627                                 <retrieve/>
2628                                 <update permission="UPDATE_MARC" global_required="true"/>
2629                                 <delete permission="UPDATE_MARC" global_required="true"/>
2630                         </actions>
2631                 </permacrud>
2632         </class>
2633         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2634                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2635                         <field name="char_encoding" />
2636                         <field name="id" />
2637                         <field name="record" />
2638                         <field name="record_status" />
2639                         <field name="thesaurus" />
2640                 </fields>
2641                 <links>
2642                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2643                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2644                 </links>
2645         </class>
2646         <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">
2647                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2648                         <field name="id" reporter:datatype="id" />
2649                         <field name="bib" reporter:datatype="link" />
2650                         <field name="authority" reporter:datatype="link" />
2651                 </fields>
2652                 <links>
2653                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2654                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2655                 </links>
2656         </class>
2657         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2658                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2659                         <field name="id" reporter:datatype="id" />
2660                         <field name="record" reporter:datatype="link" />
2661                         <field name="atag" reporter:datatype="link" />
2662                         <field name="value" reporter:datatype="text" />
2663                 </fields>
2664                 <links>
2665                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2666                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2667                 </links>
2668         </class>
2669         <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">
2670                 <fields oils_persist:primary="code" oils_persist:sequence="">
2671                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2672                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2673                 </fields>
2674                 <links/>
2675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2676             <actions>
2677                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2678                 <retrieve/>
2679                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2680                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2681             </actions>
2682         </permacrud>
2683         </class>
2684         <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">
2685                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2686                         <field name="accepting_usr" />
2687                         <field name="amount" reporter:datatype="money" />
2688                         <field name="amount_collected" reporter:datatype="money" />
2689                         <field name="approval_code" reporter:datatype="text"/>
2690                         <field name="cash_drawer" reporter:datatype="link"/>
2691                         <field name="cc_number" reporter:datatype="text"/>
2692                         <field name="cc_order_number" reporter:datatype="text"/>
2693                         <field name="cc_processor" reporter:datatype="text"/>
2694                         <field name="id" reporter:datatype="id" />
2695                         <field name="note" reporter:datatype="text"/>
2696                         <field name="payment_ts" reporter:datatype="timestamp"/>
2697                         <field name="xact" reporter:datatype="link"/>
2698                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2699                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2700                 </fields>
2701                 <links>
2702                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2703                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2704                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2705                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2706                 </links>
2707         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2708             <actions>
2709                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2710                     <context link="xact" jump="usr" field="home_ou"/>
2711                 </retrieve>
2712                         </actions>
2713                 </permacrud>
2714         </class>
2715         <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">
2716                 <fields oils_persist:primary="name">
2717                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2718                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2719                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2720                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2721                 </fields>
2722                 <links/>
2723         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2724             <actions>
2725                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2726                 <retrieve/>
2727                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2728                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2729             </actions>
2730         </permacrud>
2731         </class>
2732
2733         <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">
2734                 <fields oils_persist:primary="alias">
2735                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2736                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2737                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2738                 </fields>
2739                 <links>
2740                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2741                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2742                 </links>
2743         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2744             <actions>
2745                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2746                 <retrieve/>
2747                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2748                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2749             </actions>
2750         </permacrud>
2751         </class>
2752
2753         <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">
2754                 <fields oils_persist:primary="name">
2755                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2756                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2757                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2758                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2759                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2760                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2761                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2762                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2763                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2764                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2765                 </fields>
2766                 <links>
2767                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2768                 </links>
2769         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2770             <actions>
2771                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2772                 <retrieve/>
2773                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2774                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2775             </actions>
2776         </permacrud>
2777         </class>
2778
2779         <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">
2780                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2781                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2782                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2783                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2784                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2785                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2786                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2787                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2788                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2789                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2790                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2791                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2792                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2793                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2794                 </fields>
2795                 <links>
2796                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2797                 </links>
2798         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2799             <actions>
2800                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2801                 <retrieve/>
2802                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2803                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2804             </actions>
2805         </permacrud>
2806         </class>
2807         <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">
2808                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2809                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2810                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2811                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2812                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2813                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2814                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2815                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2816                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2817                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2818                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2819                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2820                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2821                 </fields>
2822                 <links>
2823                 </links>
2824                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2825                         <actions>
2826                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2827                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2828                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2829                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2830                         </actions>
2831                 </permacrud>
2832         </class>
2833         <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">
2834                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2835                         <field name="id" reporter:datatype="id" />
2836                         <field name="name" reporter:datatype="text"/>
2837                         <field name="xpath" reporter:datatype="text"/>
2838                         <field name="format" reporter:datatype="link"/>
2839                         <field name="first_word" reporter:datatype="bool" />
2840                 </fields>
2841                 <links/>
2842         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2843             <actions>
2844                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2845                 <retrieve/>
2846                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2847                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2848             </actions>
2849         </permacrud>
2850         </class>
2851         <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">
2852                 <fields oils_persist:primary="code" oils_persist:sequence="">
2853                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2854                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2855                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2856                 </fields>
2857                 <links/>
2858         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2859             <actions>
2860                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2861                 <retrieve/>
2862                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2863                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2864             </actions>
2865         </permacrud>
2866         </class>
2867         <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">
2868                 <fields oils_persist:primary="code" oils_persist:sequence="">
2869                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2870                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2871                 </fields>
2872                 <links/>
2873         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2874             <actions>
2875                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2876                 <retrieve/>
2877                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2878                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2879             </actions>
2880         </permacrud>
2881         </class>
2882     <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">
2883         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2884             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2885             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2886             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2887             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2888         </fields>
2889         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2890             <actions>
2891                 <retrieve/>
2892             </actions>
2893         </permacrud>
2894     </class>
2895         <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">
2896                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2897                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2898                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2899                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2900                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2901                 </fields>
2902                 <links>
2903                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2904                 </links>
2905         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2906             <actions>
2907                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2908                 <retrieve/>
2909                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2910                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2911             </actions>
2912         </permacrud>
2913         </class>
2914         <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">
2915                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2916                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2917                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2918                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2919                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2920                 </fields>
2921                 <links>
2922                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2923                 </links>
2924         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2925             <actions>
2926                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2927                 <retrieve/>
2928                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2929                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2930             </actions>
2931         </permacrud>
2932         </class>
2933         <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">
2934                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2935                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2936                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2937                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2938                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2939                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2940                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2941                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2942                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2943                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2944                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2945                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2946                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2947                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2948                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2949                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2950                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2951                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2952                 </fields>
2953                 <links>
2954                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2955                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2956                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2957                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2958                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2959                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2960                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2961                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2962                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2963                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2964                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2965                 </links>
2966         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2967             <actions>
2968                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2969                 <retrieve/>
2970                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2971                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2972             </actions>
2973         </permacrud>
2974         </class>
2975         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2976                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2977                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2978                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2979                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2980                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2981                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2982                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2983                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2984                 </fields>
2985                 <links>
2986                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2987                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2988         </links>
2989         </class>
2990         <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">
2991                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2992                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2993                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2994                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2995                 </fields>
2996                 <links>
2997                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2998                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2999                 </links>
3000         </class>
3001         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3002                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3003                         <field name="id" reporter:datatype="id" />
3004                         <field name="value" oils_persist:i18n="true" />
3005                 </fields>
3006                 <links/>
3007         </class>
3008         <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">
3009                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3010                         <field name="balance_owed" reporter:datatype="money" />
3011                         <field name="total_owed" reporter:datatype="money" />
3012                         <field name="total_paid" reporter:datatype="money" />
3013                         <field name="usr" reporter:datatype="link"/>
3014                 </fields>
3015                 <links>
3016                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3017         </links>
3018         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3019             <actions>
3020                 <retrieve permission="VIEW_USER">
3021                     <context link="usr" field="home_ou"/>
3022                 </retrieve>
3023             </actions>
3024         </permacrud>
3025         </class>
3026         <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">
3027                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3028                         <field name="collector" />
3029                         <field name="enter_time" reporter:datatype="timestamp"/>
3030                         <field name="id" reporter:datatype="id" />
3031                         <field name="location" reporter:datatype="link"/>
3032                         <field name="usr" reporter:datatype="link"/>
3033                 </fields>
3034                 <links>
3035                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3036                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3037                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3038                 </links>
3039         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3040             <actions>
3041                 <create permission="money.collections_tracker.create" context_field="location"/>
3042                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3043                 <delete permission="money.collections_tracker.create" context_field="location"/>
3044             </actions>
3045         </permacrud>
3046         </class>
3047         <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">
3048                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3049                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3050                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3051                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3052                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3053                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3054                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3055                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3056                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3057                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3058                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3059                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3060                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3061                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3062                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3063                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3064                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3065                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3066                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3067                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3068                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3069                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3070                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3071                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3072                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3073                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3074                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3075                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3076                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3077                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3078                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3079                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3080                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3081                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3082                 </fields>
3083                 <links>
3084                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3085                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3086                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3087                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3088                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3089                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3090                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3091                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3092                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3093                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3094                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3095                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3096                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3097                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3098                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3099                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3100                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3101                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3102                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3103                         <link field="mattrs" reltype="might_have" key="id" map="" class="mraf"/>
3104                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3105                 </links>
3106         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3107             <actions>
3108                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3109                 <retrieve/>
3110                 <update permission="UPDATE_MARC" global_required="true"/>
3111                 <!-- 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. -->
3112                 <delete permission="DELETE_RECORD" global_required="true"/>
3113             </actions>
3114         </permacrud>
3115         </class>
3116         <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">
3117                 <fields oils_persist:primary="id">
3118                         <field name="dow_0_close" />
3119                         <field name="dow_0_open" />
3120                         <field name="dow_1_close" />
3121                         <field name="dow_1_open" />
3122                         <field name="dow_2_close" />
3123                         <field name="dow_2_open" />
3124                         <field name="dow_3_close" />
3125                         <field name="dow_3_open" />
3126                         <field name="dow_4_close" />
3127                         <field name="dow_4_open" />
3128                         <field name="dow_5_close" />
3129                         <field name="dow_5_open" />
3130                         <field name="dow_6_close" />
3131                         <field name="dow_6_open" />
3132                         <field name="id" reporter:datatype="id" />
3133                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3134                 </fields>
3135                 <links>
3136                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3137                 </links>
3138         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3139             <actions>
3140                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3141                 <retrieve/>
3142                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3143                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3144             </actions>
3145         </permacrud>
3146         </class>
3147         <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">
3148                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3149                         <field name="id" reporter:datatype="id" />
3150                         <field name="record" reporter:datatype="link"/>
3151                         <field name="label" reporter:datatype="text"/>
3152                         <field name="label_sortkey" reporter:datatype="text"/>
3153                         <field name="deleted" reporter:datatype="bool"/>
3154                 </fields>
3155                 <links>
3156                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3157                 </links>
3158         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3159             <actions>
3160                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3161                 <retrieve/>
3162                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3163                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3164             </actions>
3165         </permacrud>
3166         </class>
3167         <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">
3168                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3169                         <field name="id" reporter:datatype="id" />
3170                         <field name="target_copy" reporter:datatype="link" />
3171                         <field name="part" reporter:datatype="link"/>
3172                 </fields>
3173                 <links>
3174                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3175                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3176                 </links>
3177         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3178             <actions>
3179                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3180                 <retrieve/>
3181                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3182                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3183             </actions>
3184         </permacrud>
3185         </class>
3186         <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">
3187                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3188                         <field name="close_end" reporter:datatype="timestamp" />
3189                         <field name="close_start" reporter:datatype="timestamp" />
3190                         <field name="id" reporter:datatype="id" />
3191                         <field name="org_unit" reporter:datatype="org_unit"/>
3192                         <field name="reason" reporter:datatype="text"/>
3193                 </fields>
3194                 <links>
3195                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3196                 </links>
3197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3198             <actions>
3199                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3200                 <retrieve/>
3201                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3202                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3203             </actions>
3204         </permacrud>
3205         </class>
3206         <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">
3207                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3208                         <field name="extended" reporter:datatype="interval"/>
3209                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3210                         <field name="max_renewals" reporter:datatype="int" />
3211                         <field name="name" reporter:datatype="text"/>
3212                         <field name="normal" reporter:datatype="interval"/>
3213                         <field name="shrt" reporter:datatype="interval"/>
3214                 </fields>
3215                 <links>
3216                 </links>
3217         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3218             <actions>
3219                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3220                 <retrieve/>
3221                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3222                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3223             </actions>
3224         </permacrud>
3225         </class>
3226
3227         <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">
3228                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3229                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3230                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3231             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3232                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3233             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3234                 </fields>
3235                 <links>
3236             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3237                 </links>
3238                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3239             <actions>
3240                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3241                 <retrieve/>
3242                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3243                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3244             </actions>
3245                 </permacrud>
3246         </class>
3247
3248         <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">
3249                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3250                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3251                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3252                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3253             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3254                 </fields>
3255                 <links>
3256                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3257                 </links>
3258                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3259             <actions>
3260                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3261                 <retrieve/>
3262                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3263                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3264             </actions>
3265                 </permacrud>
3266         </class>
3267
3268         <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">
3269                 <fields oils_persist:primary="id" oils_persist:sequence="">
3270                         <field name="balance_owed" reporter:datatype="money"/>
3271                         <field name="id" reporter:datatype="id" />
3272                         <field name="last_billing_note" reporter:datatype="text"/>
3273                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3274                         <field name="last_billing_type" reporter:datatype="text"/>
3275                         <field name="last_payment_note" reporter:datatype="text"/>
3276                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3277                         <field name="last_payment_type" reporter:datatype="text"/>
3278                         <field name="total_owed" reporter:datatype="money"/>
3279                         <field name="total_paid" reporter:datatype="money"/>
3280                         <field name="usr" reporter:datatype="link"/>
3281                         <field name="xact_finish" reporter:datatype="timestamp" />
3282                         <field name="xact_start" reporter:datatype="timestamp" />
3283                         <field name="xact_type" reporter:datatype="text"/>
3284                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3285                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3286                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3287                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3288                         <field name="billing_location" reporter:datatype="link"/>
3289                 </fields>
3290                 <links>
3291                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3292                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3293                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3294                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3295                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3296                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3297                 </links>
3298                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3299                         <actions>
3300                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3301                                         <context link="usr" field="home_ou" />
3302                                 </retrieve>
3303                         </actions>
3304                 </permacrud>
3305         </class>
3306         <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">
3307                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3308                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3309                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3310                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3311                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3312                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3313                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3314                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3315                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3316                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3317                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3318                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3319                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3320                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3321                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3322                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3323                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3324                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3325                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3326                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3327                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3328                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3329                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3330                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3331                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3332                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3333                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3334                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3335                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3336                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3337                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3338                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3339                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3340                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3341                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3342                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3343                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3344                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3345                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3346                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3347                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3348                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3349                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3350                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3351                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3352                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3353                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3354                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3355                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3356                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3357                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3358                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3359                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3360                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3361                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3362                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3363                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3364                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3365                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3366                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3367                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3368                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3369                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3370                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3371                 </fields>
3372                 <links>
3373                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3374                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3375                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3376                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3377                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3378                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3379                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3380                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3381                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3382                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3383                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3384                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3385                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3386                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3387                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3388                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3389                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3390                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3391                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3392                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3393                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3394                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3395                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3396                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3397                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3398                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3399                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3400                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3401                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3402                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3403                 </links>
3404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3405                         <actions>
3406                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3407                         </actions>
3408                 </permacrud>
3409         </class>
3410         <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">
3411                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3412                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3413                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3414                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3415                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3416                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3417                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3418                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3419                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3420         </fields>
3421                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3422                         <actions>
3423                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3424                                 <retrieve/>
3425                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3426                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3427                         </actions>
3428                 </permacrud>
3429         </class>
3430         <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">
3431                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3432                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3433                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3434                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3435                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3436         </fields>
3437         <links>
3438                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3439                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3440                 </links>
3441                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3442                         <actions>
3443                                 <retrieve permission="RUN_REPORTS">
3444                                         <context link="usr" field="home_ou" />
3445                                 </retrieve>
3446                         </actions>
3447                 </permacrud>
3448         </class>
3449         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3450                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3451                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3452                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3453                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3454                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3455                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3456                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3457         </fields>
3458         <links>
3459                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3460                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3461                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3462                 </links>
3463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3464                         <actions>
3465                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3466                                         <context link="usr" field="home_ou" />
3467                                         <context link="ws" field="owning_lib" />
3468                                 </retrieve>
3469                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3470                                         <context link="usr" field="home_ou" />
3471                                         <context link="ws" field="owning_lib" />
3472                                 </create>
3473                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3474                                         <context link="usr" field="home_ou" />
3475                                         <context link="ws" field="owning_lib" />
3476                                 </update>
3477                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3478                                         <context link="usr" field="home_ou" />
3479                                         <context link="ws" field="owning_lib" />
3480                                 </delete>
3481                         </actions>
3482                 </permacrud>
3483         </class>
3484         <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">
3485                 <fields oils_persist:primary="name">
3486                         <field name="name" reporter:datatype="text"/>
3487                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3488                 </fields>
3489                 <links/>
3490                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3491                         <actions>
3492                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3493                                 <retrieve/>
3494                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3495                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3496                         </actions>
3497                 </permacrud>
3498         </class>
3499         <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">
3500                 <fields oils_persist:primary="name">
3501                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3502                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3503                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3504                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3505                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3506                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3507                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3508                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3509                 </fields>
3510                 <links>
3511                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3512                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3513                 </links>
3514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3515                         <actions>
3516                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3517                                 <retrieve/>
3518                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3519                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3520                         </actions>
3521                 </permacrud>
3522         </class>
3523         <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">
3524                 <fields oils_persist:primary="name">
3525                         <field name="name" reporter:datatype="text"/>
3526                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3527                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3528                         <field name="datatype" reporter:datatype="text"/>
3529                         <field name="view_perm" reporter:datatype="link"/>
3530                         <field name="update_perm" reporter:datatype="link"/>
3531                         <field name="fm_class" reporter:datatype="text"/>
3532                         <field name="grp" reporter:datatype="link"/>
3533                 </fields>
3534                 <links>
3535                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3536                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3537                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3538                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3539                 </links>
3540                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3541                         <actions>
3542                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3543                                 <retrieve/>
3544                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3545                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3546                         </actions>
3547                 </permacrud>
3548         </class>
3549         <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">
3550                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3551                         <field name="id" />
3552                         <field name="name"  reporter:datatype="text"/>
3553                         <field name="org_unit" reporter:datatype="org_unit"/>
3554                         <field name="value"  reporter:datatype="text"/>
3555                 </fields>
3556                 <links>
3557                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3558                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3559                 </links>
3560         </class>
3561         <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">
3562                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3563                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3564                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3565                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3566                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3567                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3568                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3569                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3570                 </fields>
3571                 <links>
3572                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3573                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3574                 </links>
3575         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3576             <actions>
3577                 <create permission="CREATE_COPY_NOTE">
3578                     <context link="owning_copy" field="circ_lib"/>
3579                 </create>
3580                 <retrieve permission="VIEW_COPY_NOTES">
3581                     <context link="owning_copy" field="circ_lib"/>
3582                 </retrieve>
3583                 <update permission="UPDATE_COPY_NOTE">
3584                     <context link="owning_copy" field="circ_lib"/>
3585                 </update>
3586                 <delete permission="DELETE_COPY_NOTE">
3587                     <context link="owning_copy" field="circ_lib"/>
3588                 </delete>
3589             </actions>
3590         </permacrud>
3591         </class>
3592         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3593                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3594                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3595                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3596                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3597                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3598                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3599                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3600                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3601                 </fields>
3602                 <links>
3603                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3604                 </links>
3605         </class>
3606         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3607                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3608                         <field name="fingerprint"  reporter:datatype="text"/>
3609                         <field name="id" reporter:datatype="id" />
3610                         <field name="master_record" reporter:datatype="link"/>
3611                         <field name="mods"  reporter:datatype="text"/>
3612                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3613                 </fields>
3614                 <links>
3615                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3616                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3617                 </links>
3618         </class>
3619         <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">
3620                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3621                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3622                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3623                 </fields>
3624                 <links/>
3625         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3626             <actions>
3627                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3628                 <retrieve/>
3629                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3630                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3631             </actions>
3632         </permacrud>
3633         </class>
3634         <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">
3635                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3636                         <field name="code"  reporter:datatype="text"/>
3637                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3638                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3639                 </fields>
3640                 <links/>
3641         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3642             <actions>
3643                 <create permission="CREATE_PERM" global_required="true"/>
3644                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3645                 <update permission="UPDATE_PERM" global_required="true"/>
3646                 <delete permission="DELETE_PERM" global_required="true"/>
3647             </actions>
3648         </permacrud>
3649         </class>
3650         <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">
3651                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3652                         <field name="id" reporter:datatype="id" />
3653                         <field name="metarecord" reporter:datatype="link"/>
3654                         <field name="source" reporter:datatype="link"/>
3655                 </fields>
3656                 <links>
3657                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3658                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3659                 </links>
3660         </class>
3661         <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">
3662                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3663                         <field name="id" reporter:datatype="id" />
3664                         <field name="field" reporter:datatype="link"/>
3665                         <field name="source" reporter:datatype="link"/>
3666                         <field name="value"  reporter:datatype="text"/>
3667                 </fields>
3668                 <links>
3669                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3670                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3671                 </links>
3672         </class>
3673         <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">
3674                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3675                         <field name="id" reporter:datatype="id" />
3676                         <field name="value" reporter:datatype="text"/>
3677                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3678                 </fields>
3679                 <links>
3680                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3681                 </links>
3682         </class>
3683         <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">
3684                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3685                         <field name="id" reporter:datatype="id" />
3686                         <field name="entry" reporter:datatype="link"/>
3687                         <field name="def" reporter:datatype="link"/>
3688                         <field name="source" reporter:datatype="link"/>
3689                 </fields>
3690                 <links>
3691                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3692                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3693                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3694                 </links>
3695         </class>
3696         <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">
3697                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3698                         <field name="id" reporter:datatype="id" />
3699                         <field name="entry" reporter:datatype="link"/>
3700                         <field name="simple_heading" reporter:datatype="link"/>
3701                 </fields>
3702                 <links>
3703                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3704                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3705                 </links>
3706         </class>
3707         <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">
3708                 <oils_persist:source_definition>
3709                         SELECT * FROM metabib.author_field_entry
3710                                                 UNION ALL
3711                         SELECT * FROM metabib.keyword_field_entry
3712                                                 UNION ALL
3713                         SELECT * FROM metabib.identifier_field_entry
3714                                                 UNION ALL
3715                         SELECT * FROM metabib.title_field_entry
3716                                                 UNION ALL
3717                         SELECT * FROM metabib.subject_field_entry
3718                                                 UNION ALL
3719                         SELECT * FROM metabib.series_field_entry
3720                 </oils_persist:source_definition>
3721                 <fields>
3722                         <field name="field" reporter:datatype="link"/>
3723                         <field name="id" reporter:datatype="id" />
3724                         <field name="source" reporter:datatype="link"/>
3725                         <field name="value"  reporter:datatype="text"/>
3726                 </fields>
3727                 <links>
3728                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3729                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3730                 </links>
3731         </class>
3732         <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">
3733                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3734                         <field name="field" reporter:datatype="link"/>
3735                         <field name="id" reporter:datatype="id" />
3736                         <field name="source" reporter:datatype="link"/>
3737                         <field name="value"  reporter:datatype="text"/>
3738                 </fields>
3739                 <links>
3740                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3741                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3742                 </links>
3743         </class>
3744         <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">
3745                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3746                         <field name="accepting_usr" reporter:datatype="link"/>
3747                         <field name="amount" reporter:datatype="money" />
3748                         <field name="amount_collected" reporter:datatype="money" />
3749                         <field name="cash_drawer" reporter:datatype="link"/>
3750                         <field name="id" reporter:datatype="id" />
3751                         <field name="note"  reporter:datatype="text"/>
3752                         <field name="payment_ts" reporter:datatype="timestamp"/>
3753                         <field name="xact" reporter:datatype="link"/>
3754                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3755                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3756                 </fields>
3757                 <links>
3758                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3759                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3760                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3761                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3762                 </links>
3763         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3764             <actions>
3765                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3766                     <context link="xact" jump="usr" field="home_ou"/>
3767                 </retrieve>
3768                         </actions>
3769                 </permacrud>
3770         </class>
3771         <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">
3772                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3773                         <field name="accepting_usr" reporter:datatype="link"/>
3774                         <field name="amount" reporter:datatype="money" />
3775                         <field name="amount_collected" reporter:datatype="money" />
3776                         <field name="id" reporter:datatype="id" />
3777                         <field name="note"  reporter:datatype="text"/>
3778                         <field name="payment_ts" reporter:datatype="timestamp"/>
3779                         <field name="xact" reporter:datatype="link"/>
3780                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3781                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3782                 </fields>
3783                 <links>
3784                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3785                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3786                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3787                 </links>
3788         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3789             <actions>
3790                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3791                     <context link="xact" jump="usr" field="home_ou"/>
3792                 </retrieve>
3793                         </actions>
3794                 </permacrud>
3795         </class>
3796         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3797                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3798                         <field name="accepting_usr" reporter:datatype="link"/>
3799                         <field name="amount" reporter:datatype="money" />
3800                         <field name="amount_collected" reporter:datatype="money" />
3801                         <field name="id" reporter:datatype="id" />
3802                         <field name="note"  reporter:datatype="text"/>
3803                         <field name="payment_ts" reporter:datatype="timestamp"/>
3804                         <field name="xact" reporter:datatype="link"/>
3805                         <field name="billing" reporter:datatype="link"/>
3806                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3807                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3808                 </fields>
3809                 <links>
3810                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3811                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3812                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3813                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3814                 </links>
3815         </class>
3816         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3817                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3818                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3819                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3820                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3821                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3822                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3823                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3824                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3825                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3826                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3827                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3828                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3829                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3830                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3831                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3832                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3833                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3834                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3835                 </fields>
3836                 <links>
3837                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3838                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3839                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3840                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3841                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3842                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3843                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3844                 </links>
3845         </class>
3846
3847         <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">
3848                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3849                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3850                         <field name="name"  reporter:datatype="text"/>
3851                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3852                         <field name="block_list" reporter:datatype="text"/>
3853                         <field name="staff_alert" reporter:datatype="bool"/>
3854                         <field name="org_depth" reporter:datatype="int"/>
3855                         <field name="ignore_proximity" reporter:datatype="int"/>
3856                 </fields>
3857                 <links/>
3858         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3859             <actions>
3860                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3861                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3862                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3863                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3864             </actions>
3865         </permacrud>
3866         </class>
3867         <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">
3868                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3869                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3870                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3871                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3872                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3873                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3874                 </fields>
3875                 <links>
3876                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3877                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3878                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3879         </links>
3880         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3881             <actions>
3882                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3883                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3884                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3885                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3886             </actions>
3887         </permacrud>
3888         </class>
3889         <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">
3890                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3891                         <field name="holdable" reporter:datatype="bool"/>
3892                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3893                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3894                         <field name="opac_visible" reporter:datatype="bool"/>
3895             <field name="copy_active" reporter:datatype="bool"/>
3896             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3897                 </fields>
3898                 <links/>
3899         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3900             <actions>
3901                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3902                 <retrieve/>
3903                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3904                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3905             </actions>
3906         </permacrud>
3907         </class>
3908         <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">
3909                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3910                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3911                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3912                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3913                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3914                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3915                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3916                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3917                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3918                 </fields>
3919                 <links>
3920                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3921                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3922                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3923                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3924                 </links>
3925                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3926                         <actions>
3927                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3928                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3929                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3930                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3931                         </actions>
3932                 </permacrud>
3933         </class>
3934         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3935                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3936                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3937                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3938                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3939                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3940                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3941                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3942                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3943                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3944                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3945                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3946                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3947                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3948                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3949                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3950                 </fields>
3951                 <links>
3952                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3953                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3954                 </links>
3955         </class>
3956         <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">
3957                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3958                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3959                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3960                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3961                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3962                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3963                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3964                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3965                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3966                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3967                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3968                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3969                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3970                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3971                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3972                 </fields>
3973                 <links>
3974                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3975                 </links>
3976                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3977                         <actions>
3978                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3979                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3980                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3981                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3982                         </actions>
3983                 </permacrud>
3984         </class>
3985
3986
3987         <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">
3988                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3989                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3990                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3991                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3992                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3993                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3994                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3995                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3996                 </fields>
3997                 <links>
3998                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3999                 </links>
4000         </class>
4001
4002         <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">
4003                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4004                         <field name="call_number" />
4005                         <field name="create_date" reporter:datatype="timestamp"/>
4006                         <field name="creator" reporter:datatype="link"/>
4007                         <field name="id" reporter:datatype="id" />
4008                         <field name="pub" reporter:datatype="bool"/>
4009                         <field name="title"  reporter:datatype="text"/>
4010                         <field name="value"  reporter:datatype="text"/>
4011                 </fields>
4012                 <links>
4013                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4014                 </links>
4015         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4016             <actions>
4017                 <create permission="CREATE_VOLUME_NOTE">
4018                     <context link="call_number" field="owning_lib"/>
4019                 </create>
4020                 <retrieve permission="VIEW_VOLUME_NOTES">
4021                     <context link="call_number" field="owning_lib"/>
4022                 </retrieve>
4023                 <update permission="UPDATE_VOLUME_NOTE">
4024                     <context link="call_number" field="owning_lib"/>
4025                 </update>
4026                 <delete permission="DELETE_VOLUME_NOTE">
4027                     <context link="call_number" field="owning_lib"/>
4028                 </delete>
4029             </actions>
4030         </permacrud>
4031         </class>
4032         <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">
4033                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4034                         <field name="create_date" reporter:datatype="timestamp"/>
4035                         <field name="creator" reporter:datatype="link"/>
4036                         <field name="edit_date" reporter:datatype="timestamp"/>
4037                         <field name="editor" reporter:datatype="link"/>
4038                         <field name="id" reporter:datatype="id" />
4039                         <field name="record" reporter:datatype="link"/>
4040                         <field name="value" reporter:datatype="text"/>
4041                 </fields>
4042                 <links>
4043                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4044                 </links>
4045         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4046             <actions>
4047                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4048                 <retrieve/>
4049                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4050                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4051             </actions>
4052         </permacrud>
4053         </class>
4054         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4055         <oils_persist:source_definition>
4056 SELECT  usr,
4057         SUM(
4058             CASE
4059                 WHEN (
4060                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4061                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4062                 ) THEN 1
4063                 ELSE 0
4064             END
4065         ) AS out,
4066
4067         SUM(
4068             CASE
4069                 WHEN (
4070                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4071                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4072                 ) THEN 1
4073                 ELSE 0
4074             END
4075         ) AS overdue,
4076
4077         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4078         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4079         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4080   FROM  action.circulation
4081   WHERE checkin_time IS NULL
4082   GROUP BY 1
4083         </oils_persist:source_definition>
4084         <fields oils_persist:primary="usr">
4085             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4086             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4087             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4088             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4089             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4090             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4091         </fields>
4092         <links>
4093             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4094         </links>
4095         </class>
4096         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4097         <oils_persist:source_definition>
4098 SELECT  usr,
4099         STRING_AGG(
4100             CASE
4101                 WHEN (
4102                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4103                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4104                 ) THEN id::TEXT
4105                 ELSE '0'
4106             END
4107         ,',') AS out,
4108
4109         STRING_AGG(
4110             CASE
4111                 WHEN (
4112                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4113                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4114                 ) THEN id::TEXT
4115                 ELSE '0'
4116             END
4117         ,',') AS overdue,
4118
4119         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4120         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4121         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4122   FROM  action.circulation
4123   WHERE checkin_time IS NULL
4124   GROUP BY 1
4125         </oils_persist:source_definition>
4126         <fields oils_persist:primary="usr">
4127             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4128             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4129             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4130             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4131             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4132             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4133         </fields>
4134         <links>
4135             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4136         </links>
4137         </class>
4138         <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">
4139                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4140                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4141                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4142                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4143                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4144                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4145                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4146                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4147                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4148                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4149                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4150                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4151                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4152                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4153                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4154                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4155                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4156                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4157                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4158                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4159                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4160                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4161                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4162                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4163                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4164                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4165                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4166                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4167                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4168                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4169                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4170                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4171                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4172                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4173                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4174                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4175                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4176                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4177                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4178                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4179                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4180                 </fields>
4181                 <links>
4182                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4183                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4184                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4185                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4186                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4187                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4188                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4189                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4190                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4191                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4192                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4193                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4194                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4195                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4196                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4197                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4198                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4199                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4200                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4201                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4202                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4203                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4204                 </links>
4205                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4206                         <actions>
4207                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4208                         </actions>
4209                 </permacrud>
4210         </class>
4211         <class id="combcirc" controller="open-ils.cstore" 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">
4212                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4213                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4214                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4215                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4216                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4217                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4218                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4219                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4220                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4221                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4222                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4223                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4224                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4225                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4226                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4227                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4228                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4229                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4230                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4231                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4232                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4233                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4234                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4235                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4236                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4237                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4238                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4239                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4240                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4241                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4242                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4243                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4244                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4245                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4246                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4247                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4248                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4249                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4250                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4251                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4252                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4253                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4254                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4255                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4256                 </fields>
4257                 <links>
4258                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4259                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4260                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4261                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4262                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4263                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4264                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4265                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4266                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4267                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4268                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4269                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4270                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4271                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4272                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4273                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4274                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4275                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4276                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4277                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4278                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4279                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4280                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4281                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4282                 </links>
4283         </class>
4284         <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">
4285                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4286                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4287                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4288                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4289                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4290                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4291                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4292                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4293                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4294                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4295                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4296                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4297                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4298                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4299                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4300                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4301                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4302                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4303                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4304                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4305                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4306                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4307                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4308                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4309                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4310                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4311                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4312                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4313                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4314                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4315                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4316                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4317                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4318                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4319                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4320                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4321                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4322                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4323                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4324                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4325                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4326                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4327                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4328                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4329                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4330                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4331                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4332                 </fields>
4333                 <links>
4334                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4335                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4336                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4337                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4338                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4339                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4340                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4341                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4342                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4343                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4344                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4345                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4346                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4347                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4348                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4349                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4350                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4351                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4352                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4353                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4354                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4355                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4356                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4357                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4358                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4359                 </links>
4360         </class>
4361         <class id="auch" 
4362                 controller="open-ils.cstore" 
4363                 oils_obj:fieldmapper="action::user_circ_history" 
4364                 oils_persist:tablename="action.usr_circ_history" 
4365                 reporter:label="User Checkout History">
4366                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4367                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4368                         <!-- prevent reporting on the user that owns the checkout history -->
4369                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4370                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4371                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4372                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4373                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4374                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4375                 </fields>
4376                 <links>
4377                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4378                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4379                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4380                 </links>
4381         </class>
4382         <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">
4383                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4384                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4385                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4386                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4387                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4388                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4389                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4390                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4391                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4392                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4393                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4394                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4395                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4396                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4397                 </fields>
4398                 <links>
4399                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4400                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4401                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4402                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4403                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4404                 </links>
4405                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4406                         <actions>
4407                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4408                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4409                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4410                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4411                         </actions>
4412                 </permacrud>
4413         </class>
4414
4415         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4416                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4417                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4418                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4419                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4420                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4421                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4422                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4423                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4424                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4425                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4426                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4427                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4428                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4429                 </fields>
4430                 <links>
4431                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4432                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4433                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4434                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4435                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4436                 </links>
4437                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4438                         <actions>
4439                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4440                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4441                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4442                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4443                         </actions>
4444                 </permacrud>
4445         </class>
4446         
4447         <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">
4448                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4449                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4450                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4451                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4452                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4453                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4454                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4455                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4456                 </fields>
4457                 <links>
4458                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4459                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4460                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4461                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4462                 </links>
4463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4464                         <actions>
4465                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4466                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4467                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4468                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4469                         </actions>
4470                 </permacrud>
4471         </class>
4472         
4473         <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">
4474                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4475                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4476                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4477                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4478                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4479                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4480                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4481                 </fields>
4482                 <links>
4483                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4484                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4485                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4486                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4487                 </links>
4488                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4489                         <actions>
4490                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4491                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4492                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4493                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4494                         </actions>
4495                 </permacrud>
4496         </class>
4497         
4498         <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">
4499                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4500                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4501                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4502                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4503                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4504                 </fields>
4505                 <links>
4506                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4507                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4508                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4509                 </links>
4510                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4511                         <actions>
4512                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4513                     <context link="resource" field="owner" />
4514                 </create>
4515                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4516                     <context link="resource" field="owner" />
4517                 </retrieve>
4518                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4519                     <context link="resource" field="owner" />
4520                 </update>
4521                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4522                     <context link="resource" field="owner" />
4523                 </delete>
4524                         </actions>
4525                 </permacrud>
4526         </class>
4527         
4528         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4529                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4530                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4531                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4532                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4533                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4534                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4535                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4536                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4537                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4538                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4539                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4540                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4541                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4542                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4543                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4544                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4545                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4546                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4547                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4548                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4549                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4550                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4551                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4552                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4553                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4554                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4555                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4556                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4557                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4558                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4559                 </fields>
4560                 <links>
4561                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4562                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4563                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4564                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4565                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4566                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4567                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4568                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4569                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4570                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4571                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4572                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4573                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4574                 </links>
4575                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4576                         <actions>
4577                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4578                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4579                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4580                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4581                         </actions>
4582                 </permacrud>
4583         </class>
4584         
4585         <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">
4586                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4587                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4588                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4589                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4590                 </fields>
4591                 <links>
4592                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4593                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4594                 </links>
4595                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4596                         <actions>
4597                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4598                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4599                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4600                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4601                         </actions>
4602                 </permacrud>
4603         </class>
4604
4605         <class id="ccnbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item" reporter:label="Call Number Bucket Item">
4606                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4607                         <field name="bucket" reporter:datatype="link"/>
4608                         <field name="id" reporter:datatype="id" />
4609                         <field name="target_call_number" reporter:datatype="link" />
4610                         <field name="create_time" reporter:datatype="timestamp" />
4611                         <field name="pos" reporter:datatype="int" />
4612                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4613                 </fields>
4614                 <links>
4615                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4616                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4617             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4618                 </links>
4619         </class>
4620         <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">
4621                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4622                         <field name="id" reporter:datatype="id" />
4623                         <field name="item" reporter:datatype="link"/>
4624                         <field name="note" reporter:datatype="text" />
4625                 </fields>
4626                 <links>
4627                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4628                 </links>
4629         </class>
4630         <class id="cbreb" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket" oils_persist:tablename="container.biblio_record_entry_bucket" reporter:label="Bibliographic Record Entry Bucket">
4631                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4632                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4633                         <field name="btype" reporter:datatype="text"/>
4634                         <field name="id" reporter:datatype="id" />
4635                         <field name="name" reporter:datatype="text"/>
4636                         <field name="description" reporter:datatype="text"/>
4637                         <field name="owner" reporter:datatype="link"/>
4638                         <field name="pub" reporter:datatype="bool"/>
4639                         <field name="create_time" reporter:datatype="timestamp" />
4640                 </fields>
4641                 <links>
4642                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4643                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4644                 </links>
4645         </class>
4646         <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">
4647                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4648                         <field name="id" reporter:datatype="id" />
4649                         <field name="bucket" reporter:datatype="link"/>
4650                         <field name="note" reporter:datatype="text" />
4651                 </fields>
4652                 <links>
4653                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4654                 </links>
4655         </class>
4656         <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">
4657                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4658                         <field name="hold" reporter:datatype="link"/>
4659                         <field name="id" reporter:datatype="id" />
4660                         <field name="target_copy" reporter:datatype="link"/>
4661                         <field name="proximity" reporter:datatype="number"/>
4662                 </fields>
4663                 <links>
4664                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4665                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4666                 </links>
4667         </class>
4668         <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">
4669                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4670                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4671                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4672                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4673                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4674                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4675                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4676                 </fields>
4677                 <links>
4678                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4679                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4680                 </links>
4681         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4682             <actions>
4683                 <create permission="CREATE_HOLD_NOTIFICATION">
4684                                         <context link="hold" jump="usr" field="home_ou" />
4685                                 </create>
4686                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4687                                         <context link="hold" jump="usr" field="home_ou" />
4688                                 </retrieve>
4689                 <update permission="CREATE_HOLD_NOTIFICATION">
4690                                         <context link="hold" jump="usr" field="home_ou" />
4691                                 </update>
4692                 <delete permission="CREATE_HOLD_NOTIFICATION">
4693                                         <context link="hold" jump="usr" field="home_ou" />
4694                                 </delete>
4695             </actions>
4696         </permacrud>
4697         </class>
4698         <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">
4699                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4700                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4701                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4702                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4703                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4704                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4705                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4706                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4707                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4708                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4709                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4710                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4711                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4712                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4713                 </fields>
4714                 <links>
4715                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4716                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4717                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4718                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4719                 </links>
4720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4721             <actions>
4722                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4723                 <retrieve/>
4724                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4725                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4726             </actions>
4727         </permacrud>
4728         </class>
4729         <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">
4730                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4731                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4732                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4733                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4734                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4735             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4736             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4737             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4738                 </fields>
4739                 <links>
4740                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4741                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4742                 </links>
4743         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4744             <actions>
4745                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4746                 <retrieve/>
4747                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4748                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4749             </actions>
4750         </permacrud>
4751         </class>
4752         <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">
4753                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4754                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4755             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4756             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4757                 </fields>
4758                 <links>
4759                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4760                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4761                 </links>
4762         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4763             <actions>
4764                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4765                                         <context link="lgroup" field="owner" />
4766                 </create>
4767                 <retrieve/>
4768                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4769                                         <context link="lgroup" field="owner" />
4770                 </update>
4771                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4772                                         <context link="lgroup" field="owner" />
4773                 </delete>
4774             </actions>
4775         </permacrud>
4776         </class>
4777
4778     <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">
4779         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4780             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4781             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4782             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4783             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4784         </fields>
4785         <links>
4786             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4787             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4788         </links>
4789         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4790             <actions>
4791                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4792                 <retrieve/>
4793                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4794                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4795             </actions>
4796         </permacrud>
4797     </class>
4798
4799         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4800                 <fields>
4801                         <field name="sre_id" oils_persist:virtual="true" />
4802                         <field name="location" oils_persist:virtual="true" />
4803                         <field name="owning_lib" oils_persist:virtual="true" />
4804                         <field name="basic_holdings" oils_persist:virtual="true" />
4805                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4806                         <field name="supplement_holdings" oils_persist:virtual="true" />
4807                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4808                         <field name="index_holdings" oils_persist:virtual="true" />
4809                         <field name="index_holdings_add" oils_persist:virtual="true" />
4810                         <field name="online" oils_persist:virtual="true" />
4811                         <field name="missing" oils_persist:virtual="true" />
4812                         <field name="incomplete" oils_persist:virtual="true" />
4813                 </fields>
4814         </class>
4815
4816         <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">
4817                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4818                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4819                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4820                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4821                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4822                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4823                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4824                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4825                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4826                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4827                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4828                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4829                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4830                 </fields>
4831                 <links>
4832                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4833                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4834                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4835                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4836                 </links>
4837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4838                         <actions>
4839                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4840                                 <retrieve/>
4841                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4842                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4843                         </actions>
4844                 </permacrud>
4845         </class>
4846
4847         <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">
4848                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4849                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4850                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4851                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4852                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4853                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4854                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4855                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4856                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4857                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4858                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4859                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4860                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4861                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4862                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4863                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4864                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4865                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4866                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4867                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4868                 </fields>
4869                 <links>
4870                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4871                 </links>
4872                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4873                         <actions>
4874                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4875                                         <context link="subscription" field="owning_lib" />
4876                                 </create>
4877                                 <retrieve />
4878                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4879                                         <context link="subscription" field="owning_lib" />
4880                                 </update>
4881                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4882                                         <context link="subscription" field="owning_lib" />
4883                                 </delete>
4884                         </actions>
4885                 </permacrud>
4886         </class>
4887
4888         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4889                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4890                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4891                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4892                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4893                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4894                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4895                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4896                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4897                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4898                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4899                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4900                 </fields>
4901                 <links>
4902                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4903                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4904                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4905                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4906                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4907                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4908                 </links>
4909                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4910                         <actions>
4911                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4912                                 <retrieve />
4913                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4914                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4915                         </actions>
4916                 </permacrud>
4917         </class>
4918
4919         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4920                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4921                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4922                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4923                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4924                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4925                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4926                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4927                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4928                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4929                 </fields>
4930                 <links>
4931                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4932                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4933                 </links>
4934         </class>
4935
4936         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4937                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4938                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4939                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4940                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4941                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4942                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4943                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4944                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4945                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4946                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4947                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4948                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4949                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4950                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4951                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4952                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4953                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4954                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4955                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4956                 </fields>
4957                 <links>
4958                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4959                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4960                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4961                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4962                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4963                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4964                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4965                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4966                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4967                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4968                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4969                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4970                 </links>
4971                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4972                         <actions>
4973                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4974                                 <retrieve />
4975                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4976                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4977                         </actions>
4978                 </permacrud>
4979         </class>
4980
4981         <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">
4982                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4983                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4984                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4985                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4986                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4987                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4988                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4989                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4990                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4991                 </fields>
4992                 <links>
4993                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4994                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4995                 </links>
4996                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4997                         <actions>
4998                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4999                                         <context link="distribution" field="holding_lib" />
5000                                 </create>
5001                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5002                                         <context link="distribution" field="holding_lib" />
5003                                 </retrieve>
5004                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5005                                         <context link="distribution" field="holding_lib" />
5006                                 </update>
5007                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5008                                         <context link="distribution" field="holding_lib" />
5009                                 </delete>
5010                         </actions>
5011                 </permacrud>
5012         </class>
5013
5014         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5015                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5016                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5017                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5018                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5019                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5020                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5021                 </fields>
5022                 <links>
5023                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5024                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
5025                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5026                 </links>
5027                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5028                         <actions>
5029                                 <create permission="ADMIN_SERIAL_STREAM">
5030                                         <context link="distribution" field="holding_lib" />
5031                                 </create>
5032                                 <retrieve />
5033                                 <update permission="ADMIN_SERIAL_STREAM">
5034                                         <context link="distribution" field="holding_lib" />
5035                                 </update>
5036                                 <delete permission="ADMIN_SERIAL_STREAM">
5037                                         <context link="distribution" field="holding_lib" />
5038                                 </delete>
5039                         </actions>
5040                 </permacrud>
5041         </class>
5042
5043         <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">
5044                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5045                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5046                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5047                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5048                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5049                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5050                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5051                 </fields>
5052                 <links>
5053                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5054                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5055                 </links>
5056                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5057                         <actions>
5058                                 <create permission="ADMIN_SERIAL_STREAM">
5059                                         <context link="stream" jump="distribution" field="holding_lib" />
5060                                 </create>
5061                                 <retrieve permission="RECEIVE_SERIAL">
5062                                         <context link="stream" jump="distribution" field="holding_lib" />
5063                                 </retrieve>
5064                                 <update permission="ADMIN_SERIAL_STREAM">
5065                                         <context link="stream" jump="distribution" field="holding_lib" />
5066                                 </update>
5067                                 <delete permission="ADMIN_SERIAL_STREAM">
5068                                         <context link="stream" jump="distribution" field="holding_lib" />
5069                                 </delete>
5070                         </actions>
5071                 </permacrud>
5072         </class>
5073
5074         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5075                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5076                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5077                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5078                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5079                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5080                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5081                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5082                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5083                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5084                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5085                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5086                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5087                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5088                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5089                 </fields>
5090                 <links>
5091                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5092                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5093                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5094                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5095                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5096                 </links>
5097                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5098                         <actions>
5099                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5100                                         <context link="subscription" field="owning_lib" />
5101                                 </create>
5102                                 <retrieve/>
5103                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5104                                         <context link="subscription" field="owning_lib" />
5105                                 </update>
5106                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5107                                         <context link="subscription" field="owning_lib" />
5108                                 </delete>
5109                         </actions>
5110                 </permacrud>
5111         </class>
5112
5113         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5114                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5115                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5116                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5117                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5118                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5119                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5120                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5121                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5122                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5123                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5124                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5125                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5126                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5127                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5128                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5129                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5130                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5131                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5132                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5133                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5134                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5135                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5136                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5137                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5138                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5139                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5140                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5141                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5142                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5143                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5144                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5145                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5146                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5147                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5148                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5149                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5150                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5151                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5152                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5153                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5154                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5155                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5156                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5157                 </fields>
5158                 <links>
5159                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5160                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5161                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5162                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5163                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5164                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5165                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5166                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5167                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5168                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5169                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5170                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5171                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5172                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5173                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5174                 </links>
5175                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5176                         <actions>
5177                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5178                                 <retrieve/>
5179                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5180                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5181                         </actions>
5182                 </permacrud>
5183         </class>
5184
5185         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5186                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5187                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5188                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5189                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5190                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5191                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5192                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5193                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5194                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5195                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5196                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5197                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5198                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5199                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5200                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5201                 </fields>
5202                 <links>
5203                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5204                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5205                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5206                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5207                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5208                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5209                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5210                 </links>
5211                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5212                         <actions>
5213                                 <create permission="ADMIN_SERIAL_ITEM">
5214                                         <context link="stream" jump="distribution" field="holding_lib" />
5215                                 </create>
5216                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5217                                         <context link="stream" jump="distribution" field="holding_lib" />
5218                                 </retrieve>
5219                                 <update permission="ADMIN_SERIAL_ITEM">
5220                                         <context link="stream" jump="distribution" field="holding_lib" />
5221                                 </update>
5222                                 <delete permission="ADMIN_SERIAL_ITEM">
5223                                         <context link="stream" jump="distribution" field="holding_lib" />
5224                                 </delete>
5225                         </actions>
5226                 </permacrud>
5227         </class>
5228
5229         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5230                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5231                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5232                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5233                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5234                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5235                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5236                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5237                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5238                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5239                 </fields>
5240                 <links>
5241                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5242                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5243                 </links>
5244                 <!-- Not available via PCRUD at this time -->
5245         </class>
5246         <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">
5247                 <fields>
5248                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5249                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5250                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5251                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5252                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5253                 </fields>
5254                 <links>
5255                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5256                 </links>
5257         </class>
5258         <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">
5259                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5260                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5261                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5262                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5263                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5264                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5265                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5266                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5267                 </fields>
5268                 <links>
5269                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5270                 </links>
5271         </class>
5272         <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">
5273                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5274                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5275                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5276                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5277                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5278                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5279                 </fields>
5280                 <links>
5281                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5282                 </links>
5283                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5284                         <actions>
5285                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5286                                         <context link="distribution" field="holding_lib" />
5287                                 </create>
5288                                 <retrieve/>
5289                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5290                                         <context link="distribution" field="holding_lib" />
5291                                 </update>
5292                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5293                                         <context link="distribution" field="holding_lib" />
5294                                 </delete>
5295                         </actions>
5296                 </permacrud>
5297         </class>
5298
5299         <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">
5300                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5301                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5302                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5303                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5304                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5305                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5306                 </fields>
5307                 <links>
5308                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5309                 </links>
5310                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5311                         <actions>
5312                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5313                                         <context link="distribution" field="holding_lib" />
5314                                 </create>
5315                                 <retrieve/>
5316                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5317                                         <context link="distribution" field="holding_lib" />
5318                                 </update>
5319                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5320                                         <context link="distribution" field="holding_lib" />
5321                                 </delete>
5322                         </actions>
5323                 </permacrud>
5324         </class>
5325
5326         <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">
5327                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5328                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5329                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5330                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5331                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5332                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5333                 </fields>
5334                 <links>
5335                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5336                 </links>
5337                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5338                         <actions>
5339                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5340                                         <context link="distribution" field="holding_lib" />
5341                                 </create>
5342                                 <retrieve/>
5343                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5344                                         <context link="distribution" field="holding_lib" />
5345                                 </update>
5346                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5347                                         <context link="distribution" field="holding_lib" />
5348                                 </delete>
5349                         </actions>
5350                 </permacrud>
5351         </class>
5352
5353         <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">
5354                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5355                         <field name="id" reporter:datatype="id" />
5356                         <field name="owning_copy" reporter:datatype="link"/>
5357                         <field name="stat_cat" reporter:datatype="link"/>
5358                         <field name="stat_cat_entry" reporter:datatype="link"/>
5359                 </fields>
5360                 <links>
5361                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5362                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5363                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5364                 </links>
5365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5366                         <actions>
5367                                 <retrieve/>
5368                         </actions>
5369                 </permacrud>
5370         </class>
5371         <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">
5372                 <fields oils_persist:primary="code">
5373                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5374                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5375                 </fields>
5376                 <links/>
5377         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5378             <actions>
5379                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5380                 <retrieve/>
5381                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5382                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5383             </actions>
5384         </permacrud>
5385         </class>
5386         <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">
5387                 <fields oils_persist:primary="code">
5388                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5389                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5390                 </fields>
5391                 <links/>
5392         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5393             <actions>
5394                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5395                 <retrieve/>
5396                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5397                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5398             </actions>
5399         </permacrud>
5400         </class>
5401         <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">
5402                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5403                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5404                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5405                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5406                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5407                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5408                 </fields>
5409                 <links>
5410             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5411         </links>
5412         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5413             <actions>
5414                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5415                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5416                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5417                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5418             </actions>
5419         </permacrud>
5420         </class>
5421         <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">
5422                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5423                         <field name="id" reporter:datatype="id" />
5424                         <field name="name" reporter:datatype="text"/>
5425                 </fields>
5426                 <links/>
5427         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5428             <actions>
5429                 <create permission="CREATE_LASSO" global_required="true"/>
5430                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5431                 <update permission="UPDATE_LASSO" global_required="true"/>
5432                 <delete permission="DELETE_LASSO" global_required="true"/>
5433             </actions>
5434         </permacrud>
5435         </class>
5436         <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">
5437                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5438                         <field name="id" reporter:datatype="id" />
5439                         <field name="lasso" reporter:datatype="link"/>
5440                         <field name="org_unit" reporter:datatype="org_unit"/>
5441                 </fields>
5442                 <links>
5443                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5444                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5445                 </links>
5446         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5447             <actions>
5448                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5449                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5450                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5451                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5452             </actions>
5453         </permacrud>
5454         </class>
5455         <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">
5456                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5457                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5458                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5459                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5460                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5461                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5462                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5463                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5464                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5465                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5466                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5467                 </fields>
5468                 <links>
5469                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5470                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5471                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5472                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5473                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5474                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5475                 </links>
5476         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5477             <actions>
5478                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5479                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5480                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5481                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5482             </actions>
5483         </permacrud>
5484         </class>
5485         <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">
5486                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5487                         <field name="id" reporter:datatype="id" />
5488                         <field name="from_org" reporter:datatype="org_unit"/>
5489                         <field name="to_org" reporter:datatype="org_unit"/>
5490                         <field name="prox" reporter:datatype="int" />
5491                 </fields>
5492                 <links>
5493                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5494                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5495                 </links>
5496         </class>
5497         <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">
5498                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5499                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5500                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5501                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5502                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5503                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5504                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5505                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5506                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5507                 </fields>
5508                 <links/>
5509         </class>
5510         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5511                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5512                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5513                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5514                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5515                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5516                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5517                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5518                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5519                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5520                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5521                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5522                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5523                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5524                 </fields>
5525                 <links>
5526                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5527                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5528                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5529                 </links>
5530         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5531             <actions>
5532                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5533                 <retrieve/>
5534                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5535                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5536             </actions>
5537         </permacrud>
5538         </class>
5539         <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">
5540                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5541                         <field name="address_type"  reporter:datatype="text"/>
5542                         <field name="city"  reporter:datatype="text"/>
5543                         <field name="country"  reporter:datatype="text"/>
5544                         <field name="county"  reporter:datatype="text"/>
5545                         <field name="id" reporter:datatype="id" />
5546                         <field name="org_unit" reporter:datatype="org_unit"/>
5547                         <field name="post_code"  reporter:datatype="text"/>
5548                         <field name="state"  reporter:datatype="text"/>
5549                         <field name="street1"  reporter:datatype="text"/>
5550                         <field name="street2"  reporter:datatype="text"/>
5551                         <field name="valid" reporter:datatype="bool"/>
5552                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5553                 </fields>
5554                 <links>
5555                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5556                 </links>
5557         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5558             <actions>
5559                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5560                 <retrieve/>
5561                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5562                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5563             </actions>
5564         </permacrud>
5565         </class>
5566         <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">
5567                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5568                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5569                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5570                         <field name="query_text" reporter:datatype="text"/>
5571                 </fields>
5572         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5573             <actions>
5574                 <retrieve/>
5575             </actions>
5576         </permacrud>
5577         </class>
5578
5579         <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">
5580                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5581                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5582                         <field name="owner" reporter:datatype="org_unit"/>
5583                         <field name="code" reporter:datatype="text"/>
5584                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5585                         <field name="create_date" reporter:datatype="timestamp"/>
5586                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5587                 </fields>
5588                 <links>
5589                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5590                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5591                 </links>
5592         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5593             <actions>
5594                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5595                 <retrieve/>
5596                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5597                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5598             </actions>
5599         </permacrud>
5600         </class>
5601         <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">
5602                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5603                         <field name="id" reporter:datatype="id"/>
5604                         <field name="grp" reporter:datatype="link"/>
5605                         <field name="pos" reporter:datatype="int"/>
5606                         <field name="query" reporter:datatype="link"/>
5607                 </fields>
5608                 <links>
5609                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5610                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5611                 </links>
5612         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5613             <actions>
5614                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5615                     <context link="grp" field="owner"/>
5616                 </create>
5617                 <retrieve/>
5618                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5619                     <context link="grp" field="owner"/>
5620                 </update>
5621                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5622                     <context link="grp" field="owner"/>
5623                 </delete>
5624             </actions>
5625         </permacrud>
5626         </class>
5627
5628         <!-- A note: Please update alhr and ahopl when updating ahr -->
5629         <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">
5630                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5631                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5632                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5633                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5634                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5635                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5636                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5637                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5638                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5639                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5640                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5641                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5642                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5643                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5644                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5645                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5646                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5647                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5648                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5649                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5650                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5651                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5652                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5653                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5654                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5655                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5656                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5657                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5658                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5659                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5660                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5661                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5662                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5663                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5664                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5665                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5666                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5667                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5668                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5669                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5670                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5671                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5672                 </fields>
5673                 <links>
5674                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5675                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5676                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5677                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5678                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5679                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5680                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5681                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5682                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5683                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5684                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5685                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5686                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5687                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5688                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5689                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5690                 </links>
5691                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5692                         <actions>
5693                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5694                         </actions>
5695                 </permacrud>
5696         </class>
5697         <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">
5698                 <oils_persist:source_definition><![CDATA[
5699                 SELECT
5700                         ahr.*,
5701                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5702                                 copy_location_order_position,
5703                         CASE WHEN au.alias IS NOT NULL THEN
5704                                 au.alias
5705                         ELSE
5706                                 au.first_given_name
5707                         END AS usr_alias_or_first_given_name,
5708                         au.first_given_name AS usr_first_given_name,
5709                         au.second_given_name AS usr_second_given_name,
5710                         au.family_name AS usr_family_name,
5711                         au.prefix AS usr_prefix,
5712                         au.suffix AS usr_suffix,
5713                         au.alias AS usr_alias,
5714                         CASE WHEN au.alias IS NOT NULL THEN
5715                                 au.alias
5716                         ELSE
5717                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5718                                         COALESCE(au.family_name, ''),
5719                                         COALESCE(au.suffix, ''),
5720                                         ', ',
5721                                         COALESCE(au.prefix, ''),
5722                                         COALESCE(au.first_given_name, ''),
5723                                         COALESCE(au.second_given_name, '')
5724                                 ], ' '), E'\\s+,', ',')
5725                         END AS usr_alias_or_display_name,
5726                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5727                                 COALESCE(au.family_name, ''),
5728                                 COALESCE(au.suffix, ''),
5729                                 ', ',
5730                                 COALESCE(au.prefix, ''),
5731                                 COALESCE(au.first_given_name, ''),
5732                                 COALESCE(au.second_given_name, '')
5733                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5734                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5735                                 AS call_number_label,
5736                         siss.label AS issuance_label,
5737                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5738                         ahcm_1.copy_count AS potential_copies
5739                 FROM action.hold_request ahr
5740                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5741                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5742                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5743                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5744                 JOIN actor.usr au ON (au.id = ahr.usr)
5745                 JOIN (
5746                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5747                         FROM asset.copy_location
5748                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5749                 LEFT JOIN actor.usr_standing_penalty ausp 
5750                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5751                 LEFT JOIN config.standing_penalty csp
5752                         ON (
5753                                 csp.id = ausp.standing_penalty AND 
5754                                 csp.block_list LIKE '%CAPTURE%' AND (
5755                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5756                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5757                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5758                                         )
5759                                 )
5760                         )
5761                 JOIN (
5762                         SELECT COUNT(target_copy) AS copy_count, hold
5763                         FROM action.hold_copy_map
5764                         GROUP BY 2
5765                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5766                 LEFT JOIN serial.issuance siss
5767                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5768                 LEFT JOIN asset.copy_location_order acplo
5769                         ON (acp.location = acplo.location AND
5770                                 acp.circ_lib = acplo.org)
5771                 WHERE
5772                         ahr.capture_time IS NULL AND
5773                         ahr.cancel_time IS NULL AND
5774                         csp.id IS NULL AND
5775                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5776                         acp.status IN (0,7)
5777                 ]]></oils_persist:source_definition>
5778                 <fields oils_persist:primary="id">
5779                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5780                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5781                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5782                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5783                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5784                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5785                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5786                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5787                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5788                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5789                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5790                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5791                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5792                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5793                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5794                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5795                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5796                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5797                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5798                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5799                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5800                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5801                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5802                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5803                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5804                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5805                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5806                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5807                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5808                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5809                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5810                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5811                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5812                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5813                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5814                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5815                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5816                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5817                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5818                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5819                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5820                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5821                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5822                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5823                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5824                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5825                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5826                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5827                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5828                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5829                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5830                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5831                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5832                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5833                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5834                 </fields>
5835                 <links>
5836                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5837                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5838                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5839                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5840                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5841                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5842                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5843                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5844                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5845                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5846                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5847                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5848                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5849                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5850                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5851                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5852                 </links>
5853                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5854                         <actions>
5855                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5856                         </actions>
5857                 </permacrud>
5858         </class>
5859         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5860                 <oils_persist:source_definition>
5861                         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)
5862                 </oils_persist:source_definition>
5863                 <fields oils_persist:primary="id">
5864                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5865                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5866                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5867                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5868                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5869                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5870                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5871                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5872                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5873                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5874                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5875                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5876                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5877                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5878                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5879                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5880                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5881                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5882                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5883                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5884                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5885                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5886                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5887                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5888                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5889                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5890                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5891                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5892                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5893                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5894                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5895                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5896                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5897                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5898                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5899                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5900                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5901                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5902                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5903                 </fields>
5904                 <links>
5905                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5906                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5907                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5908                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5909                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5910                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5911                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5912                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5913                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5914                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5915                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5916                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5917                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5918                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5919                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5920                 </links>
5921         </class>
5922
5923         <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">
5924                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5925                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5926                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5927                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5928                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5929                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5930                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5931                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5932                 </fields>
5933                 <links>
5934                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5935                 </links>
5936                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5937                         <actions>
5938                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5939                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5940                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5941                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5942                         </actions>
5943                 </permacrud>
5944         </class>
5945         <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">
5946                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5947                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5948                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5949                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5950                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5951                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5952                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5953                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5954                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5955                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5956                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5957                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5958                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5959                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5960                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5961                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5962                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5963                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5964                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5965                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5966                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5967                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5968                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5969                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5970                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5971                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5972                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5973                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5974                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5975                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5976                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5977                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5978                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5979                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5980                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5981                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5982                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5983                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5984                 </fields>
5985                 <links>
5986                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5987                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5988                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5989                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5990                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5991                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5992                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5993                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5994                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5995                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5996                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5997                 </links>
5998                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5999                         <actions>
6000                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6001                         </actions>
6002                 </permacrud>
6003         </class>
6004         <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">
6005                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6006                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6007                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6008                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
6009                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6010                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6011                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6012                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6013                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6014                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6015                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6016                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6017                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6018                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6019                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6020                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6021                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6022                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6023                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6024                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6025                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6026                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6027                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6028                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6029                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6030                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6031                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6032                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6033                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6034                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6035                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6036                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6037                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6038                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6039                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6040                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6041                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6042                 </fields>
6043                 <links>
6044                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6045                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6046                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6047                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6048                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6049                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6050                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6051                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6052                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6053                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6054                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6055                 </links>
6056                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6057                         <actions>
6058                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6059                         </actions>
6060                 </permacrud>
6061         </class>
6062
6063         <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">
6064                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6065                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6066                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6067                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6068                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6069                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6070                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6071                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6072                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6073                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6074                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6075                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6076                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6077                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6078                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6079                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6080                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6081                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6082                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6083                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6084                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6085                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6086                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6087                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6088                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6089                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6090                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6091                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6092                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6093                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6094                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6095                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6096                 </fields>
6097                 <links>
6098                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6099                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6100                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6101                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6102                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6103                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6104                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6105                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6106                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6107                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6108                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6109                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6110                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6111                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6112                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6113                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6114                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6115                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6116                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6117                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6118                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6119                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6120                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6121                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6122                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6123                 </links>
6124         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6125             <actions>
6126                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6127                 <retrieve />
6128                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6129                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6130             </actions>
6131         </permacrud>
6132         </class>
6133         <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">
6134                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6135                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6136                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6137                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6138                 </fields>
6139                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6140                         <actions>
6141                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6142                                 <retrieve/>
6143                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6144                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6145                         </actions>
6146                 </permacrud>
6147         </class>
6148         <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">
6149                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6150                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6151                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6152                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6153                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6154                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6155                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6156                 </fields>
6157                 <links>
6158                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6159                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6160                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6161                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6162                 </links>
6163                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6164                         <actions>
6165                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6166                                 <retrieve/>
6167                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6168                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6169                         </actions>
6170                 </permacrud>
6171         </class>
6172         <class id="ccnb" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket" oils_persist:tablename="container.call_number_bucket" reporter:label="Call Number Bucket">
6173                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6174                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6175                         <field name="btype" reporter:datatype="text"/>
6176                         <field name="id" reporter:datatype="id" />
6177                         <field name="name"  reporter:datatype="text"/>
6178                         <field name="description" reporter:datatype="text"/>
6179                         <field name="owner" reporter:datatype="link"/>
6180                         <field name="pub" reporter:datatype="bool"/>
6181                         <field name="create_time" reporter:datatype="timestamp" />
6182                 </fields>
6183                 <links>
6184                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6185                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6186                 </links>
6187         </class>
6188         <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">
6189                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6190                         <field name="id" reporter:datatype="id" />
6191                         <field name="bucket" reporter:datatype="link"/>
6192                         <field name="note" reporter:datatype="text" />
6193                 </fields>
6194                 <links>
6195                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6196                 </links>
6197         </class>
6198         <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">
6199                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6200                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6201                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6202                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6203                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6204                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6205                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6206                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6207                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6208                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6209                 </fields>
6210                 <links>
6211                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6212                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6213                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6214                 </links>
6215                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6216                         <actions>
6217                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6218                         </actions>
6219                 </permacrud>
6220         </class>
6221         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6222                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6223                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6224                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6225                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6226                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6227                 </fields>
6228                 <links>
6229                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6230                 </links>
6231                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6232                         <actions>
6233                                 <retrieve permission="VIEW_USER">
6234                                         <context link="usr" field="home_ou" />
6235                                 </retrieve>
6236                         </actions>
6237                 </permacrud>
6238         </class>
6239     <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">
6240         <fields oils_persist:primary="field">
6241             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6242             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6243             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6244         </fields>
6245         <links/>
6246         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6247             <actions>
6248                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6249                 <retrieve />
6250                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6251                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6252             </actions>
6253         </permacrud>
6254     </class>
6255         <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">
6256                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6257                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6258                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6259                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6260                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6261                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6262                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6263                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6264                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6265                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6266                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6267                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6268                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6269                 </fields>
6270                 <links>
6271                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6272                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6273                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6274                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6275                 </links>
6276         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6277             <actions>
6278                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6279                 <retrieve />
6280                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6281                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6282             </actions>
6283         </permacrud>
6284         </class>
6285         <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">
6286                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6287                         <field name="field" reporter:datatype="link"/>
6288                         <field name="id" reporter:datatype="id" />
6289                         <field name="source" reporter:datatype="link"/>
6290                         <field name="value"  reporter:datatype="text"/>
6291                 </fields>
6292                 <links>
6293                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6294                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6295                 </links>
6296         </class>
6297         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6298                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6299                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6300                         <field name="btype" reporter:datatype="text"/>
6301                         <field name="id" reporter:datatype="id" />
6302                         <field name="name"  reporter:datatype="text"/>
6303                         <field name="description" reporter:datatype="text"/>
6304                         <field name="owner" reporter:datatype="link"/>
6305                         <field name="pub" reporter:datatype="bool"/>
6306                         <field name="create_time" reporter:datatype="timestamp" />
6307                 </fields>
6308                 <links>
6309                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6310                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6311                 </links>
6312         </class>
6313         <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">
6314                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6315                         <field name="id" reporter:datatype="id" />
6316                         <field name="bucket" reporter:datatype="link"/>
6317                         <field name="note" reporter:datatype="text" />
6318                 </fields>
6319                 <links>
6320                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6321                 </links>
6322         </class>
6323         <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">
6324                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6325                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6326                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6327                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6328                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6329                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6330                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6331                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6332                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6333                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6334                 </fields>
6335                 <links>
6336                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6337                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6338                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6339                 </links>
6340         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6341             <actions>
6342                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6343                     <context link="xact" jump="usr" field="home_ou"/>
6344                 </retrieve>
6345                         </actions>
6346                 </permacrud>
6347         </class>
6348         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6349                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6350                         <field name="id" reporter:datatype="id" />
6351                         <field name="ind1" />
6352                         <field name="ind2" />
6353                         <field name="record" />
6354                         <field name="subfield" />
6355                         <field name="tag" />
6356                         <field name="value" />
6357                 </fields>
6358                 <links>
6359                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6360                 </links>
6361         </class>
6362         <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">
6363                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6364                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6365                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6366                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6367                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6368                 </fields>
6369                 <links>
6370                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6371                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6372                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6373                 </links>
6374         </class>
6375         <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">
6376                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6377                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6378                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6379                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6380                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6381                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6382                 </fields>
6383                 <links>
6384                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6385                 </links>
6386         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6387             <actions>
6388                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6389                 <retrieve/>
6390                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6391                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6392             </actions>
6393         </permacrud>
6394
6395         </class>
6396         <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">
6397                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6398                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6399                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6400                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6401                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6402                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6403                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6404                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6405                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6406                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6407                 </fields>
6408                 <links>
6409                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6410                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6411                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6412                 </links>
6413         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6414             <actions>
6415                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6416                 <retrieve/>
6417                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6418                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6419             </actions>
6420         </permacrud>
6421         </class>
6422         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6423                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6424                         <field name="create_date" reporter:datatype="timestamp"/>
6425                         <field name="creator" reporter:datatype="link"/>
6426                         <field name="edit_date" reporter:datatype="timestamp"/>
6427                         <field name="editor" reporter:datatype="link"/>
6428                         <field name="id" reporter:datatype="id" />
6429                         <field name="pub" reporter:datatype="bool"/>
6430                         <field name="record" reporter:datatype="link"/>
6431                         <field name="value"  reporter:datatype="text"/>
6432                 </fields>
6433                 <links>
6434                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6435                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6436                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6437                 </links>
6438         </class>
6439         <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">
6440                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6441                         <field name="balance_owed" reporter:datatype="money" />
6442                         <field name="total_owed" reporter:datatype="money" />
6443                         <field name="total_paid" reporter:datatype="money" />
6444                         <field name="usr" reporter:datatype="link"/>
6445                 </fields>
6446                 <links>
6447                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6448                 </links>
6449         </class>
6450         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6451                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6452                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6453                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6454                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6455                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6456                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6457                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6458                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6459                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6460                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6461                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6462                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6463                 </fields>
6464                 <links>
6465                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6466                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6467                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6468                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6469                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6470                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6471                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6472                 </links>
6473         </class>
6474         <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">
6475                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6476                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6477                         <field name="quality" reporter:datatype="int" />
6478                         <field name="source" reporter:datatype="text"/>
6479                         <field name="transcendant" reporter:datatype="bool"/>
6480                         <field name="can_have_copies" reporter:datatype="bool"/>
6481                 </fields>
6482                 <links/>
6483         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6484             <actions>
6485                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6486                 <retrieve/>
6487                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6488                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6489             </actions>
6490         </permacrud>
6491         </class>
6492         <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">
6493                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6494                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6495                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6496                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6497                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6498                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6499                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6500                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6501                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6502                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6503                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6504                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6505                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6506                 </fields>
6507                 <links>
6508                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6509                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6510                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6511                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6512                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6513                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6514                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6515                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6516                 </links>
6517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6518                         <actions>
6519                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6520                                         <context link="usr" field="home_ou" />
6521                                 </retrieve>
6522                         </actions>
6523                 </permacrud>
6524         </class>
6525         <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">
6526                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6527                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6528                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6529                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6530                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6531                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6532                 </fields>
6533                 <links>
6534                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6535                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6536                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6537                 </links>
6538         </class>
6539         <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">
6540                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6541                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6542                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6543                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6544                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6545                 </fields>
6546                 <links>
6547                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6548                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6549                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6550                 </links>
6551         </class>
6552         <class id="cubi" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_item" oils_persist:tablename="container.user_bucket_item" reporter:label="User Bucket Item">
6553                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6554                         <field name="bucket" reporter:datatype="link"/>
6555                         <field name="id" reporter:datatype="id" />
6556                         <field name="target_user" reporter:datatype="link"/>
6557                         <field name="create_time" reporter:datatype="timestamp" />
6558                         <field name="pos" reporter:datatype="int" />
6559                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6560                 </fields>
6561                 <links>
6562                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6563                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6564             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6565                 </links>
6566         </class>
6567         <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">
6568                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6569                         <field name="id" reporter:datatype="id" />
6570                         <field name="item" reporter:datatype="link"/>
6571                         <field name="note" reporter:datatype="text" />
6572                 </fields>
6573                 <links>
6574                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6575                 </links>
6576         </class>
6577         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6578                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6579                         <field name="balance_owed" reporter:datatype="money" />
6580                         <field name="total_owed" reporter:datatype="money" />
6581                         <field name="total_paid" reporter:datatype="money" />
6582                         <field name="usr" reporter:datatype="link"/>
6583                 </fields>
6584                 <links>
6585                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6586                 </links>
6587         </class>
6588         <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">
6589                 <fields oils_persist:primary="code" oils_persist:sequence="">
6590                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6591                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6592                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6593                 </fields>
6594                 <links/>
6595         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6596             <actions>
6597                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6598                 <retrieve/>
6599                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6600                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6601             </actions>
6602         </permacrud>
6603         </class>
6604         <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">
6605                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6606                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6607                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6608                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6609                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6610                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6611                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6612                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6613                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6614                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6615                 </fields>
6616                 <links>
6617                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6618                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6619                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6620                 </links>
6621         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6622             <actions>
6623                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6624                     <context link="xact" jump="usr" field="home_ou"/>
6625                 </retrieve>
6626                         </actions>
6627                 </permacrud>
6628         </class>
6629         <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">
6630                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6631                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6632                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6633                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6634                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6635                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6636                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6637                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6638                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6639                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6640                 </fields>
6641                 <links>
6642                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6643                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6644                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6645                 </links>
6646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6647             <actions>
6648                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6649                     <context link="xact" jump="usr" field="home_ou"/>
6650                 </retrieve>
6651                         </actions>
6652                 </permacrud>
6653         </class>
6654         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6655                 <fields oils_persist:primary="id" oils_persist:sequence="">
6656                         <field name="checkin_lib" reporter:datatype="link"/>
6657                         <field name="checkin_staff" reporter:datatype="link"/>
6658                         <field name="checkin_time" reporter:datatype="timestamp"/>
6659                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6660                         <field name="circ_staff" reporter:datatype="link"/>
6661                         <field name="desk_renewal" reporter:datatype="bool"/>
6662                         <field name="due_date" reporter:datatype="timestamp"/>
6663                         <field name="duration" reporter:datatype="interval"/>
6664                         <field name="duration_rule" reporter:datatype="link"/>
6665                         <field name="fine_interval" reporter:datatype="interval"/>
6666                         <field name="id" reporter:datatype="id" />
6667                         <field name="max_fine" reporter:datatype="money" />
6668                         <field name="max_fine_rule" reporter:datatype="link"/>
6669                         <field name="opac_renewal" reporter:datatype="bool"/>
6670                         <field name="phone_renewal" reporter:datatype="bool"/>
6671                         <field name="recurring_fine" reporter:datatype="money" />
6672                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6673                         <field name="renewal_remaining" reporter:datatype="int" />
6674             <field name="grace_period" reporter:datatype="interval" />
6675                         <field name="stop_fines" reporter:datatype="text"/>
6676                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6677                         <field name="target_copy" reporter:datatype="link"/>
6678                         <field name="usr" reporter:datatype="link"/>
6679                         <field name="xact_finish" reporter:datatype="timestamp" />
6680                         <field name="xact_start" reporter:datatype="timestamp" />
6681                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6682                 </fields>
6683                 <links>
6684                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6685                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6686                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6687                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6688                 </links>
6689         </class>
6690         <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">
6691                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6692                         <field name="field" reporter:datatype="link"/>
6693                         <field name="id" reporter:datatype="id" />
6694                         <field name="source" reporter:datatype="link"/>
6695                         <field name="value" reporter:datatype="text"/>
6696                 </fields>
6697                 <links>
6698                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6699                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6700                 </links>
6701         </class>
6702         <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">
6703                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6704                         <field name="high" reporter:datatype="money" />
6705                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6706                         <field name="low" reporter:datatype="money" />
6707                         <field name="name" reporter:datatype="text"/>
6708                         <field name="normal" reporter:datatype="money" />
6709                         <field name="recurrence_interval" reporter:datatype="interval"/>
6710             <field name="grace_period" reporter:datatype="interval" />
6711                 </fields>
6712                 <links/>
6713         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6714             <actions>
6715                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6716                 <retrieve/>
6717                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6718                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6719             </actions>
6720         </permacrud>
6721         </class>
6722         <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">
6723                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6724                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6725                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6726                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6727                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6728                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6729                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6730                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6731                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6732                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6733                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6734                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6735                 </fields>
6736                 <links>
6737                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6738                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6739                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6740                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6741                 </links>
6742         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6743             <actions>
6744                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6745                     <context link="xact" jump="usr" field="home_ou"/>
6746                 </retrieve>
6747                         </actions>
6748                 </permacrud>
6749         </class>
6750         <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">
6751                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6752                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6753                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6754                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6755                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6756                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6757                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6758                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6759                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6760                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6761                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6762                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6763                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6764                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6765                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6766                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6767                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6768                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6769                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6770                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6771                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6772                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6773                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6774                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6775                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6776                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6777                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6778                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6779                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6780                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6781                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6782                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6783                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6784                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6785                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6786                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6787                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6788                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6789                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6790                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6791                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6792                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6793                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6794                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6795                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6796                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6797                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6798                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
6799                 </fields>
6800                 <links>
6801                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6802                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6803                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6804                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6805                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6806                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6807                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6808                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6809                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6810                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6811                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6812                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6813                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
6814                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
6815                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6816                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6817                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6818                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6819                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6820                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6821                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6822                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6823                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
6824                 </links>
6825         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6826             <actions>
6827                 <create permission="CREATE_COPY">
6828                     <context link="call_number" field="owning_lib"/>
6829                 </create>
6830                 <retrieve/>
6831                 <update permission="UPDATE_COPY">
6832                     <context link="call_number" field="owning_lib"/>
6833                 </update>
6834                 <delete permission="DELETE_COPY">
6835                     <context link="call_number" field="owning_lib"/>
6836                 </delete>
6837             </actions>
6838         </permacrud>
6839         </class>
6840
6841         <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">
6842                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6843                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6844                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6845                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6846                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6847                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6848                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6849                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6850                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6851                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6852                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6853                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6854                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6855                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6856                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6857                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6858                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6859                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6860                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6861                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6862                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6863                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6864                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6865                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6866                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6867                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6868                 </fields>
6869                 <links>
6870                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6871                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6872                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6873                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6874                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6875                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6876                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6877                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6878                 </links>
6879                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6880                         <actions>
6881                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6882                                 <retrieve />
6883                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6884                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6885                         </actions>
6886                 </permacrud>
6887         </class>
6888
6889         <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">
6890                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6891                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6892                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6893                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6894                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6895                 </fields>
6896                 <links/>
6897         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6898             <actions>
6899                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6900                 <retrieve/>
6901                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6902                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6903             </actions>
6904         </permacrud>
6905         </class>
6906         <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">
6907                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6908                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6909                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6910                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6911                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6912                 </fields>
6913                 <links/>
6914         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6915             <actions>
6916                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6917                 <retrieve/>
6918                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6919                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6920             </actions>
6921         </permacrud>
6922         </class>
6923         <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">
6924                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6925                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6926                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6927                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6928                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6929                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6930                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6931                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6932                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6933                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6934                 </fields>
6935                 <links>
6936                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6937                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6938                 </links>
6939         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6940             <actions>
6941                 <create permission="CREATE_PERM" global_required="true"/>
6942                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6943                 <update permission="UPDATE_PERM" global_required="true"/>
6944                 <delete permission="DELETE_PERM" global_required="true"/>
6945             </actions>
6946         </permacrud>
6947         </class>
6948         <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">
6949                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6950                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6951                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6952                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6953                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6954                 </fields>
6955                 <links>
6956                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6957                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6958                 </links>
6959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6960             <actions>
6961                 <create permission="ADMIN_SURVEY">
6962                     <context link="question" jump="survey" field="owner"/>
6963                 </create>
6964                 <retrieve/>
6965                 <update permission="ADMIN_SURVEY">
6966                     <context link="question" jump="survey" field="owner"/>
6967                 </update>
6968                 <delete permission="ADMIN_SURVEY">
6969                     <context link="question" jump="survey" field="owner"/>
6970                 </delete>
6971             </actions>
6972         </permacrud>
6973         </class>
6974         <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">
6975                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6976                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6977                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6978                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6979                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6980                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6981                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6982                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6983                 </fields>
6984                 <links>
6985                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6986                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6987                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6988                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6989                 </links>
6990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6991                         <actions>
6992                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
6993                         </actions>
6994                 </permacrud>
6995         </class>
6996         <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">
6997                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6998                         <field name="balance_owed" reporter:datatype="money" />
6999                         <field name="total_owed" reporter:datatype="money" />
7000                         <field name="total_paid" reporter:datatype="money" />
7001                         <field name="usr" reporter:datatype="link"/>
7002                 </fields>
7003                 <links>
7004                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7005                 </links>
7006         </class>
7007         <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">
7008                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7009                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7010                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7011                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7012                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7013                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7014                 </fields>
7015                 <links>
7016                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7017                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7018                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7019                 </links>
7020         </class>
7021         <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">
7022                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7023                         <field name="field" reporter:datatype="link"/>
7024                         <field name="id" reporter:datatype="id" />
7025                         <field name="source" reporter:datatype="link"/>
7026                         <field name="value" reporter:datatype="text"/>
7027                 </fields>
7028                 <links>
7029                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7030                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7031                 </links>
7032         </class>
7033         <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">
7034                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7035                         <field name="field" reporter:datatype="link"/>
7036                         <field name="id" reporter:datatype="id" />
7037                         <field name="source" reporter:datatype="link"/>
7038                         <field name="value" reporter:datatype="text"/>
7039                 </fields>
7040                 <links>
7041                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7042                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7043                 </links>
7044         </class>
7045         <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">
7046                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7047                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7048                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7049                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7050                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7051                 </fields>
7052                 <links>
7053                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7054                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7055                 </links>
7056         </class>
7057         <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">
7058                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7059                         <field name="depth" reporter:datatype="int" />
7060                         <field name="grantable" reporter:datatype="bool"/>
7061                         <field name="grp" reporter:datatype="link"/>
7062                         <field name="id" reporter:datatype="id" />
7063                         <field name="perm" reporter:datatype="link"/>
7064                 </fields>
7065                 <links>
7066                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7067                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7068                 </links>
7069         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7070             <actions>
7071                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7072                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7073                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7074                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7075             </actions>
7076         </permacrud>
7077         </class>
7078         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
7079                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7080                         <field name="items" oils_persist:virtual="true" />
7081                         <field name="btype" reporter:datatype="text"/>
7082                         <field name="id" reporter:datatype="id" />
7083                         <field name="name" reporter:datatype="text"/>
7084                         <field name="description" reporter:datatype="text"/>
7085                         <field name="owner" reporter:datatype="link"/>
7086                         <field name="pub" reporter:datatype="bool"/>
7087                         <field name="create_time" reporter:datatype="timestamp" />
7088                 </fields>
7089                 <links>
7090                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7091                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7092                 </links>
7093         </class>
7094         <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">
7095                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7096                         <field name="id" reporter:datatype="id" />
7097                         <field name="bucket" reporter:datatype="link"/>
7098                         <field name="note" reporter:datatype="text" />
7099                 </fields>
7100                 <links>
7101                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7102                 </links>
7103         </class>
7104         <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">
7105                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7106                         <field name="id" reporter:datatype="int" />
7107                         <field name="usr" reporter:datatype="link"/>
7108                         <field name="work_ou" reporter:datatype="link"/>
7109                 </fields>
7110                 <links>
7111                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7112                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7113                 </links>
7114         </class>
7115         <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">
7116                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7117                         <field name="depth" reporter:datatype="int"/>
7118                         <field name="grantable" reporter:datatype="bool"/>
7119                         <field name="id" reporter:datatype="id" />
7120                         <field name="perm" reporter:datatype="link"/>
7121                         <field name="usr" reporter:datatype="link"/>
7122                 </fields>
7123                 <links>
7124                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7125                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7126                 </links>
7127         </class>
7128         <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">
7129                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7130                         <field name="object_id" reporter:datatype="text"/>
7131                         <field name="grantable" reporter:datatype="bool"/>
7132                         <field name="id" reporter:datatype="id" />
7133                         <field name="perm" reporter:datatype="link"/>
7134                         <field name="usr" reporter:datatype="link"/>
7135                         <field name="object_type" reporter:datatype="text"/>
7136                 </fields>
7137                 <links>
7138                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7139                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7140                 </links>
7141         </class>
7142         <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">
7143                 <fields oils_persist:primary="id" oils_persist:sequence="">
7144                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7145                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7146                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7147                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7148                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7149                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7150                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7151                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7152                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7153                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7154                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7155                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7156                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7157                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7158                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7159                 </fields>
7160                 <links>
7161                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7162                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7163                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7164                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7165                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7166                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7167                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7168                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7169                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7170                 </links>
7171         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7172             <actions>
7173                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7174                     <context link="xact" jump="usr" field="home_ou"/>
7175                 </retrieve>
7176                         </actions>
7177                 </permacrud>
7178         </class>
7179         <class id="mbp" controller="open-ils.cstore" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
7180                 <fields oils_persist:primary="id" oils_persist:sequence="">
7181                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7182                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7183                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7184                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7185                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7186                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7187                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7188                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7189                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7190                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7191                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7192                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7193                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7194                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7195                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7196                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7197                 </fields>
7198                 <links>
7199                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7200                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7201                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7202                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7203                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7204                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7205                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7206                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7207                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7208                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7209                 </links>
7210         </class>
7211         <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">
7212                 <fields oils_persist:primary="id" oils_persist:sequence="">
7213                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7214                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7215                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7216                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7217                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7218                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7219                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7220                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7221                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7222                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7223                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7224                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7225                 </fields>
7226                 <links>
7227                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7228                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7229                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7230                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7231                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7232                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7233                 </links>
7234         </class>
7235         <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">
7236                 <fields oils_persist:primary="id" oils_persist:sequence="">
7237                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7238                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7239                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7240                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7241                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7242                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7243                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7244                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7245                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7246                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7247                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7248                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7249                 </fields>
7250                 <links>
7251                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7252                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7253                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7254                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7255                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7256                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7257                 </links>
7258         </class>
7259         <class id="cbrebi" controller="open-ils.cstore" 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">
7260                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7261                         <field name="bucket" reporter:datatype="link"/>
7262                         <field name="id" reporter:datatype="id" />
7263                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7264                         <field name="create_time" reporter:datatype="timestamp" />
7265                         <field name="pos" reporter:datatype="int" />
7266                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7267                 </fields>
7268                 <links>
7269                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7270                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7271             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7272                 </links>
7273         </class>
7274         <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">
7275                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7276                         <field name="id" reporter:datatype="id" />
7277                         <field name="item" reporter:datatype="link"/>
7278                         <field name="note" reporter:datatype="text" />
7279                 </fields>
7280                 <links>
7281                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7282                 </links>
7283         </class>
7284         <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">
7285                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7286                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7287                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7288                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7289                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7290                 </fields>
7291                 <links>
7292                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7293                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7294                 </links>
7295                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7296                         <actions>
7297                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7298                         </actions>
7299                 </permacrud>
7300         </class>
7301     <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">
7302         <fields oils_persist:primary="field">
7303             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7304             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7305             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7306         </fields>
7307         <links/>
7308         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7309             <actions>
7310                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7311                 <retrieve />
7312                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7313                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7314             </actions>
7315         </permacrud>
7316     </class>
7317         <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">
7318                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7319                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7320                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7321                 </fields>
7322                 <links/>
7323         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7324             <actions>
7325                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7326                 <retrieve/>
7327                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7328                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7329             </actions>
7330         </permacrud>
7331         </class>
7332
7333
7334         <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">
7335                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7336                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7337                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7338                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7339                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7340                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7341                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7342                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7343                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7344                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7345                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7346                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7347                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7348                 </fields>
7349                 <links>
7350                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7351                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7352                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7353                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7354                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7355                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7356                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7357                 </links>
7358         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7359             <actions>
7360                 <create permission="TRANSIT_COPY">
7361                     <context link="target_copy" field="owner"/>
7362                 </create>
7363                 <retrieve/>
7364                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7365                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7366             </actions>
7367         </permacrud>
7368         </class>
7369         <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">
7370                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7371                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7372                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7373                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7374                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7375                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7376                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7377                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7378                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7379                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7380                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7381                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7382                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7383                 </fields>
7384                 <links>
7385                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7386                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7387                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7388                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7389                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7390                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7391                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7392                 </links>
7393         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7394             <actions>
7395                 <create permission="TRANSIT_COPY" context_field="owner">
7396                     <context link="target_copy" field="circ_lib"/>
7397                 </create>
7398                 <retrieve/>
7399                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7400                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7401             </actions>
7402         </permacrud>
7403         </class>
7404         <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">
7405                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7406                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7407                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7408                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7409                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7410                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7411                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7412                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7413                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7414                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7415                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7416                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
7417                 </fields>
7418                 <links>
7419                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7420                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7421                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7422                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
7423                 </links>
7424         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7425             <actions>
7426                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7427                     <context link="xact" jump="usr" field="home_ou"/>
7428                 </retrieve>
7429                         </actions>
7430                 </permacrud>
7431         </class>
7432         <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">
7433                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7434                         <field name="grp" />
7435                         <field name="id" reporter:datatype="id" />
7436                         <field name="usr" />
7437                 </fields>
7438                 <links>
7439                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7440                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7441                 </links>
7442         </class>
7443         <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">
7444                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7445                         <field name="id" reporter:datatype="id" />
7446                         <field name="fq_field" reporter:datatype="text"/>
7447                         <field name="identity_value" reporter:datatype="text"/>
7448                         <field name="translation" reporter:datatype="text"/>
7449                         <field name="string" reporter:datatype="text"/>
7450                 </fields>
7451                 <links>
7452                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7453                 </links>
7454         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7455             <actions>
7456                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7457                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7458                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7459                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7460             </actions>
7461         </permacrud>
7462         </class>
7463         <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">
7464                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7465                         <field name="id" reporter:datatype="id" />
7466                         <field name="fm_class" reporter:datatype="text"/>
7467                         <field name="field" reporter:datatype="text"/>
7468                         <field name="owner" reporter:datatype="org_unit"/>
7469                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7470                 </fields>
7471                 <links>
7472                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7473                 </links>
7474         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7475             <actions>
7476                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7477                 <retrieve/>
7478                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7479                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7480             </actions>
7481         </permacrud>
7482         </class>
7483         <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">
7484                 <fields oils_persist:primary="code">
7485                         <field name="code" reporter:datatype="id" />
7486                         <field name="marc_code" reporter:datatype="text"/>
7487                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7488                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7489                 </fields>
7490                 <links/>
7491         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7492             <actions>
7493                 <create permission="CREATE_LOCALE" global_required="true"/>
7494                 <retrieve/>
7495                 <update permission="UPDATE_LOCALE" global_required="true"/>
7496                 <delete permission="DELETE_LOCALE" global_required="true"/>
7497             </actions>
7498         </permacrud>
7499         </class>
7500         <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">
7501                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7502                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7503                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7504                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7505             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7506                 </fields>
7507                 <links>
7508                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7509                 </links>
7510         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7511             <actions>
7512                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7513                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7514                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7515                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7516             </actions>
7517         </permacrud>
7518         </class>
7519
7520         <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">
7521                 <fields oils_persist:primary="id">
7522                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7523                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7524                 </fields>
7525                 <links/>
7526         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7527             <actions>
7528                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7529                 <retrieve/>
7530                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7531                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7532             </actions>
7533         </permacrud>
7534         </class>
7535
7536         <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">
7537                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7538                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7539                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7540                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7541                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7542                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7543                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7544                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7545                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7546                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7547                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7548                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7549                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7550                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7551                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7552                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7553                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7554                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7555                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7556                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7557                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7558                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7559                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7560                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7561                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7562                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7563                 </fields>
7564                 <links>
7565                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7566                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7567                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7568                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7569                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7570                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7571                 </links>
7572         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7573             <actions>
7574                 <create permission="user_request.create">
7575                     <context link="usr" field="home_ou"/>
7576                                 </create>
7577                 <retrieve permission="user_request.view">
7578                     <context link="usr" field="home_ou"/>
7579                                 </retrieve>
7580                 <update permission="user_request.update">
7581                     <context link="usr" field="home_ou"/>
7582                                 </update>
7583                 <delete permission="user_request.delete">
7584                     <context link="usr" field="home_ou"/>
7585                                 </delete>
7586             </actions>
7587         </permacrud>
7588         </class>
7589
7590         <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">
7591                 <fields oils_persist:primary="code">
7592                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7593                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7594                 </fields>
7595                 <links/>
7596         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7597             <actions>
7598                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7599                 <retrieve/>
7600                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7601                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7602             </actions>
7603         </permacrud>
7604         </class>
7605
7606         <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">
7607                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7608                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7609                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7610                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7611                         <field reporter:label="Ratio" name="ratio" />
7612                 </fields>
7613                 <links>
7614                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7615                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7616                 </links>
7617                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7618                         <actions>
7619                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7620                                 <retrieve/>
7621                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7622                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7623                         </actions>
7624                 </permacrud>
7625         </class>
7626
7627         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7628                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7629                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7630                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7631                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7632                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7633                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7634                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7635                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7636                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7637                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7638                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7639                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7640                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7641                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7642                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7643                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7644                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7645                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7646                 </fields>
7647                 <links>
7648                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7649                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7650             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7651             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7652             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7653                 </links>
7654         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7655             <actions>
7656                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7657                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7658                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7659                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7660             </actions>
7661         </permacrud>
7662         </class>
7663
7664         <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">
7665                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7666                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7667                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7668                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7669                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7670                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7671                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7672                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7673                 </fields>
7674                 <links>
7675                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7676                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7677                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7678                 </links>
7679         </class>
7680
7681         <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">
7682                 <fields oils_persist:primary="code">
7683                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7684                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7685                 </fields>
7686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7687             <actions>
7688                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7689                 <retrieve/>
7690                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7691                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7692             </actions>
7693                 </permacrud>
7694         </class>
7695
7696         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7697                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7698                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7699                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7700                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7701                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7702                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7703                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7704                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7705                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7706                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7707                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7708                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7709                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7710                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7711                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7712                 </fields>
7713                 <links>
7714                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7715                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7716                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7717                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7718                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7719                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7720                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7721                 </links>
7722         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7723             <actions>
7724                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7725                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7726                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7727                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7728             </actions>
7729         </permacrud>
7730         </class>
7731
7732         <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">
7733                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7734                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7735                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7736                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7737                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7738                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7739                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7740                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7741                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7742                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7743                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7744                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7745                 </fields>
7746                 <links>
7747                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7748                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7749                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7750                 </links>
7751         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7752             <actions>
7753                 <create   permission="ADMIN_INVOICE">
7754                                         <context link="invoice" field="receiver"/>
7755                                 </create>
7756                 <retrieve permission="ADMIN_INVOICE">
7757                                         <context link="invoice" field="receiver"/>
7758                                 </retrieve>
7759                 <update   permission="ADMIN_INVOICE">
7760                                         <context link="invoice" field="receiver"/>
7761                                 </update>
7762                                 <delete   permission="ADMIN_INVOICE">
7763                                         <context link="invoice" field="receiver"/>
7764                                 </delete>
7765             </actions>
7766         </permacrud>
7767         </class>
7768
7769         <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">
7770                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7771                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7772                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7773                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7774                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7775                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7776                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7777                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7778                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7779                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7780                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7781                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7782                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7783                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7784                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7785                 </fields>
7786                 <links>
7787                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7788                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7789                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7790                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7791                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7792                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7793                 </links>
7794         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7795             <actions>
7796                 <create   permission="ADMIN_INVOICE">
7797                                         <context link="invoice" field="receiver"/>
7798                                 </create>
7799                 <retrieve permission="ADMIN_INVOICE">
7800                                         <context link="invoice" field="receiver"/>
7801                                 </retrieve>
7802                 <update   permission="ADMIN_INVOICE">
7803                                         <context link="invoice" field="receiver"/>
7804                                 </update>
7805                                 <delete   permission="ADMIN_INVOICE">
7806                                         <context link="invoice" field="receiver"/>
7807                                 </delete>
7808             </actions>
7809         </permacrud>
7810         </class>
7811
7812         <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">
7813                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7814                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7815                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7816                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7817                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7818                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7819                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7820                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7821                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7822                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7823                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7824                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7825                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7826                 </fields>
7827                 <links>
7828                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7829                 </links>
7830         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7831             <actions>
7832                 <create permission="ADMIN_PROVIDER">
7833                     <context link="provider" field="owner"/>
7834                 </create>
7835                 <retrieve permission="ADMIN_PROVIDER">
7836                     <context link="provider" field="owner"/>
7837                 </retrieve>
7838                 <update permission="ADMIN_PROVIDER">
7839                     <context link="provider" field="owner"/>
7840                 </update>
7841                 <delete permission="ADMIN_PROVIDER">
7842                     <context link="provider" field="owner"/>
7843                 </delete>
7844             </actions>
7845         </permacrud>
7846         </class>
7847
7848         <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">
7849                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7850                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7851                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7852                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7853                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7854                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7855                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7856         </fields>
7857                 <links>
7858                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7859                 </links>
7860         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7861             <actions>
7862                 <create permission="ADMIN_PROVIDER">
7863                     <context link="provider" field="owner"/>
7864                 </create>
7865                 <retrieve permission="ADMIN_PROVIDER">
7866                     <context link="provider" field="owner"/>
7867                 </retrieve>
7868                 <update permission="ADMIN_PROVIDER">
7869                     <context link="provider" field="owner"/>
7870                 </update>
7871                 <delete permission="ADMIN_PROVIDER">
7872                     <context link="provider" field="owner"/>
7873                 </delete>
7874             </actions>
7875         </permacrud>
7876     </class>
7877         <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">
7878                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7879                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7880                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7881                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7882                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7883                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7884                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7885                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7886                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7887                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7888                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7889                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7890                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7891                 </fields>
7892                 <links>
7893                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7894                 </links>
7895         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7896             <actions>
7897                 <create permission="ADMIN_PROVIDER">
7898                     <context link="contact" jump='provider' field="owner"/>
7899                 </create>
7900                 <retrieve permission="ADMIN_PROVIDER">
7901                     <context link="contact" jump='provider' field="owner"/>
7902                 </retrieve>
7903                 <update permission="ADMIN_PROVIDER">
7904                     <context link="contact" jump='provider' field="owner"/>
7905                 </update>
7906                 <delete permission="ADMIN_PROVIDER">
7907                     <context link="contact" jump='provider' field="owner"/>
7908                 </delete>
7909             </actions>
7910         </permacrud>
7911         </class>
7912
7913         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7914                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7915                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7916                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7917                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7918                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7919                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7920                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7921                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7922                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7923                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7924                 </fields>
7925                 <links>
7926                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7927                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7928                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7929                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7930                 </links>
7931         </class>
7932
7933         <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">
7934                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7935                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7936                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7937                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7938                 </fields>
7939                 <links>
7940             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7941                 </links>
7942                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7943                         <actions>
7944                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7945                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7946                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7947                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7948                         </actions>
7949                 </permacrud>
7950         </class>
7951
7952         <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">
7953                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7954                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7955                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7956                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7957                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7958                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7959                 </fields>
7960                 <links>
7961                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7962                 </links>
7963                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7964                         <actions>
7965                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7966                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7967                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7968                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7969                         </actions>
7970                 </permacrud>
7971         </class>
7972
7973         <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">
7974                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7975                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7976                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7977                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7978                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7979                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7980                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7981                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7982                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7983                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7984                 </fields>
7985                 <links>
7986                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7987                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7988             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7989             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7990                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7991                 </links>
7992         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7993             <actions>
7994                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7995                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7996                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7997                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7998             </actions>
7999         </permacrud>
8000         </class>
8001
8002         <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">
8003                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8004                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8005                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8006                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8007                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8008                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8009                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8010                 </fields>
8011                 <links>
8012                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8013                 </links>
8014                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8015                         <actions>
8016                                 <create permission="ADMIN_FUNDING_SOURCE">
8017                     <context link="funding_source" field="owner"/>
8018                 </create>
8019                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8020                     <context link="funding_source" field="owner"/>
8021                 </retrieve>
8022                                 <update permission="ADMIN_FUNDING_SOURCE">
8023                     <context link="funding_source" field="owner"/>
8024                 </update>
8025                                 <delete permission="ADMIN_FUNDING_SOURCE">
8026                     <context link="funding_source" field="owner"/>
8027                 </delete>
8028                         </actions>
8029                 </permacrud>
8030         </class>
8031
8032         <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">
8033                 <fields oils_persist:primary="id">
8034                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8035                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8036                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8037                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8038                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8039                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8040                 </fields>
8041                 <links>
8042                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8043                 </links>
8044         </class>
8045
8046         <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">
8047                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8048                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8049                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8050                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8051                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8052                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8053                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
8054                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
8055                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8056                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
8057                 </fields>
8058                 <links>
8059                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8060                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8061                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
8062                 </links>
8063                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8064                         <actions>
8065                                 <create permission="ADMIN_ACQ_FUND">
8066                     <context link="fund" field="org"/>
8067                 </create>
8068                                 <retrieve permission="ADMIN_ACQ_FUND">
8069                     <context link="fund" field="org"/>
8070                 </retrieve>
8071                                 <update permission="ADMIN_ACQ_FUND">
8072                     <context link="fund" field="org"/>
8073                 </update>
8074                                 <delete permission="ADMIN_ACQ_FUND">
8075                     <context link="fund" field="org"/>
8076                 </delete>
8077                         </actions>
8078                 </permacrud>
8079         </class>
8080
8081         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
8082                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8083                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8084                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8085                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8086                         <field reporter:label="Year" name="year" reporter:datatype="int" />
8087                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8088                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8089                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8090                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8091                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8092                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8093                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8094                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8095                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8096                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8097                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8098                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8099                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8100                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8101                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8102                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8103                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8104                 </fields>
8105                 <links>
8106                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8107                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8108             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8109             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8110             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8111             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8112             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8113             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8114             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8115             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8116             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8117                 </links>
8118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8119             <actions>
8120                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8121                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8122                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8123                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8124             </actions>
8125         </permacrud>
8126         </class>
8127
8128         <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">
8129                 <fields oils_persist:primary="fund">
8130                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8131                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8132                 </fields>
8133                 <links>
8134                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8135                 </links>
8136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8137             <actions>
8138                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8139                                         <context link="fund" field="org" />
8140                 </retrieve>
8141             </actions>
8142         </permacrud>
8143         </class>
8144
8145         <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">
8146                 <fields oils_persist:primary="fund">
8147                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8148                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8149                 </fields>
8150                 <links>
8151                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8152                 </links>
8153         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8154             <actions>
8155                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8156                                         <context link="fund" field="org" />
8157                 </retrieve>
8158             </actions>
8159         </permacrud>
8160         </class>
8161
8162         <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">
8163                 <fields oils_persist:primary="fund">
8164                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8165                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8166                 </fields>
8167                 <links>
8168                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8169                 </links>
8170         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8171             <actions>
8172                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8173                                         <context link="fund" field="org" />
8174                 </retrieve>
8175             </actions>
8176         </permacrud>
8177         </class>
8178
8179         <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">
8180                 <fields oils_persist:primary="fund">
8181                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8182                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8183                 </fields>
8184                 <links>
8185                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8186                 </links>
8187         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8188             <actions>
8189                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8190                                         <context link="fund" field="org" />
8191                 </retrieve>
8192             </actions>
8193         </permacrud>
8194         </class>
8195
8196         <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">
8197                 <fields oils_persist:primary="fund">
8198                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8199                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8200                 </fields>
8201                 <links>
8202                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8203                 </links>
8204         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8205             <actions>
8206                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8207                                         <context link="fund" field="org" />
8208                 </retrieve>
8209             </actions>
8210         </permacrud>
8211         </class>
8212
8213    <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">
8214         <fields oils_persist:primary="fund">
8215             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8216             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8217         </fields>
8218         <links>
8219             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8220         </links>
8221     </class>
8222
8223    <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">
8224         <fields oils_persist:primary="fund">
8225             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8226             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8227         </fields>
8228         <links>
8229             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8230         </links>
8231     </class>
8232
8233    <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">
8234         <fields oils_persist:primary="fund">
8235             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8236             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8237         </fields>
8238         <links>
8239             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8240         </links>
8241     </class>
8242
8243    <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">
8244         <fields oils_persist:primary="fund">
8245             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8246             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8247         </fields>
8248         <links>
8249             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8250         </links>
8251     </class>
8252
8253    <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">
8254         <fields oils_persist:primary="fund">
8255             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8256             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8257         </fields>
8258         <links>
8259             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8260         </links>
8261     </class>
8262
8263         <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">
8264                 <fields oils_persist:primary="funding_source">
8265                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8266                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8267                 </fields>
8268                 <links>
8269                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8270                 </links>
8271         </class>
8272
8273         <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">
8274                 <fields oils_persist:primary="funding_source">
8275                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8276                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8277                 </fields>
8278                 <links>
8279                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8280                 </links>
8281         </class>
8282
8283         <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">
8284                 <fields oils_persist:primary="funding_source">
8285                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8286                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8287                 </fields>
8288                 <links>
8289                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8290                 </links>
8291         </class>
8292
8293         <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">
8294                 <fields oils_persist:primary="fund">
8295                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8296                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8297                 </fields>
8298                 <links>
8299                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8300                 </links>
8301         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8302             <actions>
8303                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8304                                         <context link="fund" field="org" />
8305                 </retrieve>
8306             </actions>
8307         </permacrud>
8308     </class>
8309     <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">
8310         <oils_persist:source_definition><![CDATA[
8311             SELECT
8312                 acqf.*,
8313                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8314                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8315                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8316                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8317             FROM
8318                 acq.fund acqf
8319                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8320                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8321                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8322                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8323         ]]></oils_persist:source_definition>
8324         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8325             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8326             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8327             <field reporter:label="Name" name="name" reporter:datatype="text" />
8328             <field reporter:label="Year" name="year" reporter:datatype="int" />
8329             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8330             <field reporter:label="Code" name="code" reporter:datatype="text" />
8331             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8332             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8333             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8334             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8335             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8336
8337             <!-- non fund-native fields -->
8338             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8339             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8340             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8341             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8342         </fields>
8343         <links>
8344             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8345             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8346             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8347         </links>
8348         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8349             <actions>
8350                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8351             </actions>
8352         </permacrud>
8353         </class>
8354         <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">
8355                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8356                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8357                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8358                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8359                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8360                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8361                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8362                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8363                 </fields>
8364                 <links>
8365                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8366                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8367                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8368                 </links>
8369                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8370                         <actions>
8371                                 <create permission="ADMIN_ACQ_FUND">
8372                     <context link="fund" field="org"/>
8373                 </create>
8374                                 <retrieve permission="ADMIN_ACQ_FUND">
8375                     <context link="fund" field="org"/>
8376                 </retrieve>
8377                                 <update permission="ADMIN_ACQ_FUND">
8378                     <context link="fund" field="org"/>
8379                 </update>
8380                                 <delete permission="ADMIN_ACQ_FUND">
8381                     <context link="fund" field="org"/>
8382                 </delete>
8383                         </actions>
8384                 </permacrud>
8385         </class>
8386
8387     <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">
8388         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8389             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8390             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8391             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8392             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8393             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8394             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8395             <field reporter:label="Note" name="note" reporter:datatype="text" />
8396             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8397         </fields>
8398         <links>
8399             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8400             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8401             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8402         </links>
8403                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8404                         <actions>
8405                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8406                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8407                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8408                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8409                         </actions>
8410                 </permacrud>
8411     </class>
8412
8413         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8414                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8415                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8416                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8417                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8418                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8419                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8420                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8421                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8422                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8423                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8424                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8425                 </fields>
8426                 <links>
8427                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8428                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8429                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8430                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8431                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8432                 </links>
8433                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8434                         <actions>
8435                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8436                         </actions>
8437                 </permacrud>
8438         </class>
8439
8440         <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">
8441                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8442                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8443                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8444                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8445                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8446                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8447                 </fields>
8448                 <links>
8449                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8450                 </links>
8451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8452                         <actions>
8453                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8454                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8455                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8456                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8457                         </actions>
8458                 </permacrud>
8459         </class>
8460
8461         <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">
8462                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8463                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8464                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8465                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8466                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8467                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8468                         <field reporter:label="State" name="state" reporter:datatype="text" />
8469                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8470                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8471                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8472                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8473                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8474                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8475                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8476                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8477                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8478                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8479                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8480                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8481                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8482                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8483                 </fields>
8484                 <links>
8485                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8486                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8487                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8488                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8489                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8490                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8491                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8492                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8493                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8494                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8495                 </links>
8496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8497                         <actions>
8498                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8499                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8500                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8501                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8502                         </actions>
8503                 </permacrud>
8504         </class>
8505
8506         <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">
8507                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8508                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8509                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8510                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8511                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8512                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8513                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8514                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8515                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8516                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8517                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8518                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8519                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8520                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8521                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8522                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8523                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8524                 </fields>
8525                 <links>
8526                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8527                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8528                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8529                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8530                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8531                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8532                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8533                 </links>
8534                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8535             <actions>
8536                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8537             </actions>
8538                 </permacrud>
8539         </class>
8540
8541         <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">
8542                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8543                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8544                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8545                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8546                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8547                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8548                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8549                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8550                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8551                 </fields>
8552                 <links>
8553                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8554                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8555                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8556                 </links>
8557                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8558             <actions>
8559                 <create permission="CREATE_PURCHASE_ORDER">
8560                     <context link="purchase_order" field="ordering_agency"/>
8561                 </create>
8562                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8563                     <context link="purchase_order" field="ordering_agency"/>
8564                 </retrieve>
8565                 <update permission="CREATE_PURCHASE_ORDER">
8566                     <context link="purchase_order" field="ordering_agency"/>
8567                 </update>
8568                 <delete permission="CREATE_PURCHASE_ORDER">
8569                     <context link="purchase_order" field="ordering_agency"/>
8570                 </delete>
8571             </actions>
8572                 </permacrud>
8573         </class>
8574
8575         <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">
8576                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8577                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8578                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8579                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8580                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8581                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8582                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8583                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8584                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8585                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8586                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8587                 </fields>
8588                 <links>
8589                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8590                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8591                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8592                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8593                 </links>
8594                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8595             <actions>
8596                 <create permission="CREATE_PURCHASE_ORDER">
8597                     <context link="purchase_order" field="ordering_agency"/>
8598                 </create>
8599                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8600                     <context link="purchase_order" field="ordering_agency"/>
8601                 </retrieve>
8602                 <update permission="CREATE_PURCHASE_ORDER">
8603                     <context link="purchase_order" field="ordering_agency"/>
8604                 </update>
8605                 <delete permission="CREATE_PURCHASE_ORDER">
8606                     <context link="purchase_order" field="ordering_agency"/>
8607                 </delete>
8608             </actions>
8609                 </permacrud>
8610         </class>
8611
8612         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8613                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8614                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8615                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8616                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8617                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8618                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8619                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8620                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8621                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8622                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8623                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8624                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8625                         <field reporter:label="State" name="state" reporter:datatype="text" />
8626                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8627                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8628                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8629                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8630                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8631                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8632                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8633                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8634                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8635                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8636                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8637                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8638                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8639                 </fields>
8640                 <links>
8641                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8642                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8643                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8644                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8645                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8646                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8647                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8648                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8649                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8650                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8651                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8652                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8653                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8654                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8655                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8656                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8657                 </links>
8658                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8659                         <actions>
8660                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8661                                         <context link="purchase_order" field="ordering_agency"/>
8662                                         <context link="picklist" field="org_unit"/>
8663                                 </retrieve>
8664                         </actions>
8665                 </permacrud>
8666         </class>
8667
8668         <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">
8669                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8670                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8671                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8672                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8673                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8674                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8675                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8676                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8677                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8678                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8679                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8680                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8681                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8682                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8683                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8684                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8685                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8686                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8687                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8688                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8689                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8690                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8691                 </fields>
8692                 <links>
8693                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8694                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8695                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8696                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8697                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8698                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8699                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8700                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8701                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8702                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8703                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8704                 </links>
8705                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8706                         <actions>
8707                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8708                                         <context link="purchase_order" field="ordering_agency"/>
8709                                         <context link="picklist" field="org_unit"/>
8710                                 </retrieve>
8711                         </actions>
8712                 </permacrud>
8713         </class>
8714
8715         <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">
8716                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8717                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8718                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8719                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8720                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8721                 </fields>
8722                 <links>
8723                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8724                 </links>
8725                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8726                         <actions>
8727                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8728                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8729                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8730                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8731                         </actions>
8732                 </permacrud>
8733         </class>
8734
8735         <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">
8736                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8737                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8738                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8739                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8740                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8741                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8742                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8743                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8744                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8745                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8746                 </fields>
8747                 <links>
8748                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8749                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8750                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8751                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8752                 </links>
8753         </class>
8754
8755         <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">
8756                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8757                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8758                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8759                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8760                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8761                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8762                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8763                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8764                 </fields>
8765                 <links>
8766                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8767                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8768                 </links>
8769         </class>
8770
8771         <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">
8772                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8773                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8774                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8775                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8776                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8777                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8778                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8779                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8780                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8781                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8782                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8783                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8784                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8785                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8786                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8787                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8788                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8789                 </fields>
8790                 <links>
8791                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8792                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8793                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8794                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8795                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8796                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8797                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8798                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8799                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8800                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8801                 </links>
8802         </class>
8803
8804         <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">
8805                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8806                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8807                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8808                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8809                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8810                 </fields>
8811                 <links/>
8812                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8813                         <actions>
8814                                 <retrieve />
8815                         </actions>
8816                 </permacrud>
8817         </class>
8818
8819         <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">
8820                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8821                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8822                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8823                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8824                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8825                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8826             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8827                 </fields>
8828                 <links/>
8829         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8830             <actions>
8831                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8832                 <retrieve />
8833                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8834                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8835             </actions>
8836         </permacrud>
8837         </class>
8838
8839         <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">
8840                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8841                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8842                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8843                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8844                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8845                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8846                 </fields>
8847                 <links/>
8848         </class>
8849         <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">
8850                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8851                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8852                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8853                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8854                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8855                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8856                 </fields>
8857                 <links>
8858                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8859                 </links>
8860         </class>
8861
8862         <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">
8863             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8864                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8865                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8866                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8867                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8868                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8869                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8870         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8871
8872             </fields>
8873             <links>
8874                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8875             </links>
8876             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8877                 <actions>
8878                     <create permission="ADMIN_PROVIDER">
8879                         <context link="provider" field="owner"/>
8880                     </create>
8881                     <retrieve permission="ADMIN_PROVIDER">
8882                         <context link="provider" field="owner"/>
8883                     </retrieve>
8884                     <update permission="ADMIN_PROVIDER">
8885                         <context link="provider" field="owner"/>
8886                     </update>
8887                     <delete permission="ADMIN_PROVIDER">
8888                         <context link="provider" field="owner"/>
8889                     </delete>
8890                 </actions>
8891             </permacrud>
8892         </class>
8893         
8894         <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">
8895             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8896                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8897                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8898                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8899                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8900             </fields>
8901             <links>
8902                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8903             </links>
8904             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8905                 <actions>
8906                     <create permission="ADMIN_PROVIDER">
8907                         <context link="provider" field="owner"/>
8908                     </create>
8909                     <retrieve permission="ADMIN_PROVIDER">
8910                         <context link="provider" field="owner"/>
8911                     </retrieve>
8912                     <update permission="ADMIN_PROVIDER">
8913                         <context link="provider" field="owner"/>
8914                     </update>
8915                     <delete permission="ADMIN_PROVIDER">
8916                         <context link="provider" field="owner"/>
8917                     </delete>
8918                 </actions>
8919             </permacrud>
8920         </class>
8921         
8922         <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">
8923             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8924                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8925                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8926                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8927                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8928                 </fields>
8929                 <links/>
8930         </class>
8931
8932         <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">
8933                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8934                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8935                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8936                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8937                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8938                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8939                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8940                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8941                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8942                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8943                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8944                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8945                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8946                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8947                 </fields>
8948                 <links>
8949                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8950                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8951                 </links>
8952         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8953             <actions>
8954                 <create permission="ADMIN_PROVIDER">
8955                     <context link="provider" field="owner"/>
8956                 </create>
8957                 <retrieve permission="ADMIN_PROVIDER">
8958                     <context link="provider" field="owner"/>
8959                 </retrieve>
8960                 <update permission="ADMIN_PROVIDER">
8961                     <context link="provider" field="owner"/>
8962                 </update>
8963                 <delete permission="ADMIN_PROVIDER">
8964                     <context link="provider" field="owner"/>
8965                 </delete>
8966             </actions>
8967         </permacrud>
8968         </class>
8969
8970         <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">
8971                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8972                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8973                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8974                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8975                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8976                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8977                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8978                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8979                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8980                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8981                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8982                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8983                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8984                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8985                 </fields>
8986                 <links>
8987                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8988                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8989                 </links>
8990         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8991             <actions>
8992                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8993                     <context link="account" jump="provider" field="owner"/>
8994                 </retrieve>
8995                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8996                     <context link="account" jump="provider" field="owner"/>
8997                 </update>
8998                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8999                     <context link="account" jump="provider" field="owner"/>
9000                 </delete>
9001             </actions>
9002         </permacrud>
9003         </class>
9004
9005
9006         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
9007                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
9008                         <field name="id" reporter:datatype="id" />
9009                         <field name="parent" reporter:datatype="link"/>
9010                         <field name="owner" reporter:datatype="link"/>
9011                         <field name="create_time" reporter:datatype="timestamp"/>
9012                         <field name="name" reporter:datatype="text"/>
9013                         <field name="shared" reporter:datatype="bool"/>
9014                         <field name="share_with" reporter:datatype="link"/>
9015                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9016                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
9017                 </fields>
9018                 <links>
9019                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9020                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
9021                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
9022                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9023                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
9024                 </links>
9025         </class>
9026         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
9027                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
9028                         <field name="id" reporter:datatype="id" />
9029                         <field name="parent" reporter:datatype="link"/>
9030                         <field name="owner" reporter:datatype="link"/>
9031                         <field name="create_time" reporter:datatype="timestamp"/>
9032                         <field name="name" reporter:datatype="text"/>
9033                         <field name="shared" reporter:datatype="bool"/>
9034                         <field name="share_with" reporter:datatype="link"/>
9035                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9036                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
9037                 </fields>
9038                 <links>
9039                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9040                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
9041                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
9042                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9043                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
9044                 </links>
9045         </class>
9046         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
9047                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
9048                         <field name="id" reporter:datatype="id" />
9049                         <field name="parent" reporter:datatype="link"/>
9050                         <field name="owner" reporter:datatype="link"/>
9051                         <field name="create_time" reporter:datatype="timestamp"/>
9052                         <field name="name" reporter:datatype="text"/>
9053                         <field name="shared" reporter:datatype="bool"/>
9054                         <field name="share_with" reporter:datatype="link"/>
9055                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9056                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9057                 </fields>
9058                 <links>
9059                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9060                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
9061                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
9062                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9063                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
9064                 </links>
9065         </class>
9066         <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">
9067                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
9068                         <field name="id" reporter:datatype="id" />
9069                         <field name="owner" reporter:datatype="link"/>
9070                         <field name="create_time" reporter:datatype="timestamp"/>
9071                         <field name="name" reporter:datatype="text"/>
9072                         <field name="data" reporter:datatype="text"/>
9073                         <field name="folder" reporter:datatype="link"/>
9074                         <field name="description" reporter:datatype="text"/>
9075                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9076                 </fields>
9077                 <links>
9078                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9079                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
9080                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
9081                 </links>
9082         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9083             <actions>
9084                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9085                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9086                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9087                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9088             </actions>
9089         </permacrud>
9090         </class>
9091         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
9092                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
9093                         <field name="id" reporter:datatype="id" />
9094                         <field name="owner" reporter:datatype="link"/>
9095                         <field name="create_time" reporter:datatype="timestamp"/>
9096                         <field name="template" reporter:datatype="link"/>
9097                         <field name="data" reporter:datatype="text"/>
9098                         <field name="folder" reporter:datatype="link"/>
9099                         <field name="recur" reporter:datatype="bool"/>
9100                         <field name="recurrence" reporter:datatype="interval"/>
9101                         <field name="name" reporter:datatype="text"/>
9102                         <field name="description" reporter:datatype="text"/>
9103                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9104                 </fields>
9105                 <links>
9106                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9107                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
9108                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
9109                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
9110                 </links>
9111         </class>
9112         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
9113                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
9114                         <field name="id" reporter:datatype="id" />
9115                         <field name="runner" reporter:datatype="link"/>
9116                         <field name="start_time" reporter:datatype="timestamp"/>
9117                         <field name="complete_time" reporter:datatype="timestamp"/>
9118                         <field name="run_time" reporter:datatype="timestamp"/>
9119                         <field name="email" reporter:datatype="text"/>
9120                         <field name="excel_format" reporter:datatype="bool"/>
9121                         <field name="csv_format" reporter:datatype="bool"/>
9122                         <field name="html_format" reporter:datatype="bool"/>
9123                         <field name="error_code" reporter:datatype="int"/>
9124                         <field name="error_text" reporter:datatype="text"/>
9125                         <field name="report" reporter:datatype="link"/>
9126                         <field name="folder" reporter:datatype="link"/>
9127                         <field name="chart_pie" reporter:datatype="bool"/>
9128                         <field name="chart_bar" reporter:datatype="bool"/>
9129                         <field name="chart_line" reporter:datatype="bool"/>
9130                 </fields>
9131                 <links>
9132                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9133                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9134                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9135                 </links>
9136         </class>
9137         <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">
9138                 <fields oils_persist:primary="id">
9139                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9140                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9141                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9142                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9143                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9144                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9145                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9146                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9147                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9148                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9149                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9150                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9151                 </fields>
9152                 <links>
9153                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9154                 </links>
9155                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9156                         <actions>
9157                                 <retrieve />
9158                         </actions>
9159                 </permacrud>
9160         </class>
9161         <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">
9162                 <fields oils_persist:primary="id">
9163                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9164                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9165                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9166                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9167                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9168                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9169                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9170                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9171                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9172                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9173                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9174                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9175                 </fields>
9176                 <links>
9177                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9178                 </links>
9179         </class>
9180         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9181                 <fields oils_persist:primary="id">
9182                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9183                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9184                         <field reporter:label="Fingerprint" name="fingerprint" />
9185                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9186                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9187                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9188                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9189                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9190                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9191                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9192                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9193                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9194                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9195                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9196                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9197                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9198                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9199                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9200                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9201                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9202                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9203                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9204                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9205                 </fields>
9206                 <links>
9207                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9208                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9209                 </links>
9210         </class>
9211         <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">
9212                 <fields oils_persist:primary="id">
9213                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9214                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9215                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9216                 </fields>
9217                 <links>
9218                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9219                 </links>
9220         </class>
9221         <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">
9222                 <fields oils_persist:primary="id">
9223                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9224                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9225                 </fields>
9226                 <links>
9227                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9228                 </links>
9229         </class>
9230         <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">
9231                 <fields oils_persist:primary="id">
9232                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9233                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9234                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9235                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9236                 </fields>
9237                 <links>
9238                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9239                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9240                 </links>
9241         </class>
9242         <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">
9243                 <fields oils_persist:primary="xact">
9244                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9245                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9246                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9247                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9248                 </fields>
9249                 <links>
9250                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9251                 </links>
9252         </class>
9253         <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">
9254                 <fields oils_persist:primary="xact">
9255                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9256                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9257                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9258                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9259                 </fields>
9260                 <links>
9261                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9262                 </links>
9263         </class>
9264         <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)">
9265                 <fields oils_persist:primary="id">
9266                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9267                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9268                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9269                 </fields>
9270                 <links>
9271                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9272                 </links>
9273         </class>
9274         <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">
9275                 <fields oils_persist:primary="id">
9276                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9277                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9278                 </fields>
9279                 <links>
9280                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9281                 </links>
9282         </class>
9283         <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">
9284                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9285                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9286                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9287                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9288                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9289                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9290                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9291                 </fields>
9292                 <links>
9293                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9294                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9295                 </links>
9296                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9297                         <actions>
9298                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9299                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9300                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9301                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9302                         </actions>
9303                 </permacrud>
9304         </class>
9305         <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">
9306                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9307                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9308                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9309                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9310                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9311                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9312                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9313                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9314                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9315                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9316                 </fields>
9317                 <links>
9318                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9319                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9320                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9321                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9322                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9323                 </links>
9324                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9325                         <actions>
9326                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9327                                         <context link="formula" field="owner"/>
9328                                 </create>
9329                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9330                                         <context link="formula" field="owner"/>
9331                                 </retrieve>
9332                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9333                                         <context link="formula" field="owner"/>
9334                                 </update>
9335                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9336                                         <context link="formula" field="owner"/>
9337                                 </delete>
9338                         </actions>
9339                 </permacrud>
9340         </class>
9341
9342         <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">
9343                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9344                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9345                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9346                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9347                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9348                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9349                 </fields>
9350                 <links>
9351                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9352                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9353                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9354                 </links>
9355                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9356                         <actions>
9357                                 <create permission="CREATE_PURCHASE_ORDER">
9358                                         <context link="formula" field="owner"/>
9359                 </create>
9360                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9361                                         <context link="formula" field="owner"/>
9362                 </retrieve>
9363                                 <update permission="CREATE_PURCHASE_ORDER">
9364                                         <context link="formula" field="owner"/>
9365                 </update>
9366                                 <delete permission="CREATE_PURCHASE_ORDER">
9367                                         <context link="formula" field="owner"/>
9368                 </delete>
9369                         </actions>
9370                 </permacrud>
9371         </class>
9372
9373         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9374                 <fields oils_persist:primary="id">
9375                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9376                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9377                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9378                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9379                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9380                 </fields>
9381                 <links>
9382                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9383                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9384                 </links>
9385         </class>
9386
9387         <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">
9388                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9389                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9390                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9391                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9392                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9393                 </fields>
9394                 <links>
9395                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9396                 </links>
9397                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9398                         <actions>
9399                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9400                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9401                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9402                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9403                         </actions>
9404                 </permacrud>
9405         </class>
9406
9407         <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">
9408                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9409                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9410                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9411                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9412                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9413                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9414                 </fields>
9415                 <links>
9416                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9417                 </links>
9418                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9419                         <actions>
9420                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9421                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9422                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9423                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9424                         </actions>
9425                 </permacrud>
9426         </class>
9427
9428         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9429                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9430                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9431                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9432                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9433                 </fields>
9434                 <links>
9435                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9436                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9437                 </links>
9438         </class>
9439
9440         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9441                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9442                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9443                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9444                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9445                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9446                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9447                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9448                 </fields>
9449                 <links>
9450                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9451                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9452                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9453                 </links>
9454         </class>
9455
9456         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9457                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9458                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9459                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9460                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9461                 </fields>
9462                 <links>
9463                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9464                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9465                 </links>
9466         </class>
9467
9468         <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">
9469                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9470                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9471                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9472                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9473                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9474                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9475                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9476                 </fields>
9477                 <links>
9478                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9479                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9480                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9481                 </links>
9482         </class>
9483
9484         <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">
9485                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9486                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9487                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9488                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9489                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9490                 </fields>
9491                 <links>
9492                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9493                 </links>
9494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9495             <actions>
9496                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9497                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9498                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9499                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9500             </actions>
9501                 </permacrud>
9502         </class>
9503
9504         <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">
9505                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9506                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9507                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9508                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9509                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9510                 </fields>
9511                 <links>
9512                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9513                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9514                 </links>
9515                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9516                         <actions>
9517                                 <create permission="ADMIN_CLAIM_POLICY">
9518                                         <context link="claim_policy" field="org_unit"/>
9519                 </create>
9520                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9521                                         <context link="claim_policy" field="org_unit"/>
9522                 </retrieve>
9523                                 <update permission="ADMIN_CLAIM_POLICY">
9524                                         <context link="claim_policy" field="org_unit"/>
9525                 </update>
9526                                 <delete permission="ADMIN_CLAIM_POLICY">
9527                                         <context link="claim_policy" field="org_unit"/>
9528                 </delete>
9529                         </actions>
9530                 </permacrud>
9531         </class>
9532
9533     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9534         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9535             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9536             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9537             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9538             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9539             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9540             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9541             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9542             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9543             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9544             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9545             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9546             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9547             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9548             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9549             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9550             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9551         </fields>
9552         <links>
9553             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9554         </links>
9555     </class>
9556
9557     <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">
9558         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9559             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9560             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9561             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9562             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9563             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9564         </fields>
9565     </class>
9566
9567     <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">
9568         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9569             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9570             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9571             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9572             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9573             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9574             <field reporter:label="City" name="city" reporter:datatype="text"/>
9575             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9576             <field reporter:label="State" name="state" reporter:datatype="text"/>
9577             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9578             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9579             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9580         </fields>
9581     </class>
9582
9583     <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">
9584         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9585             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9586             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9587             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9588             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9589             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9590             <field reporter:label="City" name="city" reporter:datatype="text"/>
9591             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9592             <field reporter:label="State" name="state" reporter:datatype="text"/>
9593             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9594             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9595             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9596         </fields>
9597     </class>
9598
9599     <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">
9600         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9601             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9602             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9603             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9604             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9605             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9606             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9607         </fields>
9608     </class>
9609
9610         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9611                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9612                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9613                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9614                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9615                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9616                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9617                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9618                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9619                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9620                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9621                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9622                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9623                 </fields>
9624                 <links>
9625                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9626                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9627                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9628                 </links>
9629         </class>
9630
9631         <class id="afscv" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
9632                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9633                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9634                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9635                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9636                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9637                 </fields>
9638                 <links>
9639                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9640                 </links>
9641         </class>
9642
9643     <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">
9644         <fields>
9645             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9646             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9647             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9648         </fields>
9649                 <links>
9650                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9651                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9652                 </links>
9653     </class>
9654
9655     <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">
9656         <fields>
9657             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9658             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9659         </fields>
9660                 <links>
9661                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9662                 </links>
9663     </class>
9664
9665     <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">
9666         <fields>
9667             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9668             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9669             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9670         </fields>
9671                 <links>
9672                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9673                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9674                 </links>
9675     </class>
9676
9677     <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">
9678         <fields>
9679             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9680             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9681         </fields>
9682                 <links>
9683                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9684                 </links>
9685     </class>
9686
9687     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9688                 <oils_persist:source_definition>
9689
9690             SELECT  DISTINCT l.*
9691               FROM  action.unfulfilled_hold_loops l
9692                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9693               WHERE l.count = m.max
9694
9695                 </oils_persist:source_definition>
9696         <fields>
9697             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9698             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9699             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9700         </fields>
9701                 <links>
9702                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9703                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9704                 </links>
9705     </class>
9706
9707         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9708                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9709                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9710                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9711                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9712                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9713                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9714                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9715                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9716                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9717                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9718                 </fields>
9719                 <links>
9720                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9721                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9722                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9723                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9724                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9725                 </links>
9726         </class>
9727
9728         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9729                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9730                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9731                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9732                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9733                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9734                 </fields>
9735                 <links>
9736                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9737                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9738                 </links>
9739         </class>
9740
9741         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9742                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9743                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9744                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9745                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9746                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9747                 </fields>
9748                 <links>
9749                 </links>
9750         </class>
9751
9752         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9753                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9754                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9755                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9756                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9757                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9758                 </fields>
9759                 <links>
9760                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9761                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9762                 </links>
9763         </class>
9764         
9765         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9766                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9767                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9768                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9769                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9770                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9771                 </fields>
9772                 <links>
9773                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9774                 </links>
9775         </class>
9776         
9777         <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">
9778                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9779                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9780                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9781                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9782                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9783                 </fields>
9784                 <links>
9785                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9786                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9787                 </links>
9788         </class>
9789
9790         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9791                 <fields oils_persist:primary="name">
9792                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9793                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9794                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9795                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9796                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9797                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9798                 </fields>
9799                 <links>
9800                 </links>
9801         </class>
9802
9803         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9804                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9805                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9806                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9807                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9808                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9809                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9810                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9811                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9812                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9813                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9814                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9815                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9816                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9817                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9818                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9819                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9820                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9821                 </fields>
9822                 <links>
9823                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9824                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9825                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9826                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9827                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9828                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9829                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9830                 </links>
9831         </class>
9832
9833         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9834                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9835                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9836                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9837                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9838                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9839                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9840                 </fields>
9841                 <links>
9842                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9843                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9844                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9845                 </links>
9846         </class>
9847
9848         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9849                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9850                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9851                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9852                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9853                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9854                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9855                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9856                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9857                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9858                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9859                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9860                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9861                 </fields>
9862                 <links>
9863                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9864                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9865                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9866                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9867                 </links>
9868         </class>
9869
9870         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9871                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9872                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9873                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9874                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9875                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9876                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9877                 </fields>
9878                 <links>
9879                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9880                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9881                 </links>
9882         </class>
9883
9884         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9885                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9886                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9887                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9888                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9889                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9890                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9891                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9892                 </fields>
9893                 <links>
9894                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9895                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9896                 </links>
9897         </class>
9898
9899         <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">
9900                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9901                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9902                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9903                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9904                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9905                 </fields>
9906                 <links>
9907                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9908                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9909                 </links>
9910         </class>
9911
9912         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9913                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9914                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9915                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9916                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9917                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9918                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9919                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9920                 </fields>
9921                 <links>
9922                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9923                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9924                 </links>
9925         </class>
9926
9927         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9928                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9929                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9930                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9931                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9932                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9933                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9934                 </fields>
9935                 <links>
9936                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9937                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9938                 </links>
9939         </class>
9940
9941         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9942                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9943                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9944                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9945                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9946                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9947                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9948                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9949                 </fields>
9950                 <links>
9951                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9952                 </links>
9953         </class>
9954
9955         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9956                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9957                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9958                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9959                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9960                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9961                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9962                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9963                 </fields>
9964                 <links>
9965                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9966                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9967                 </links>
9968         </class>
9969
9970         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9971                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9972                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9973                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9974                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9975                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9976                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9977                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9978                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9979                 </fields>
9980                 <links>
9981                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9982                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9983                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9984                 </links>
9985         </class>
9986
9987         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9988                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9989                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9990                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9991                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9992                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9993                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9994                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9995                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9996                 </fields>
9997                 <links>
9998                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9999                 </links>
10000         </class>
10001
10002         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
10003                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10004                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10005                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10006                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10007                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10008                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10009                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10010                 </fields>
10011                 <links>
10012                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10013                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10014                 </links>
10015         </class>
10016
10017         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
10018                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10019                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10020                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10021                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10022                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10023                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10024                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10025                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10026                 </fields>
10027                 <links>
10028                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10029                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10030                 </links>
10031         </class>
10032
10033         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
10034                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10035                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10036                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10037                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10038                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10039                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10040                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10041                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10042                 </fields>
10043                 <links>
10044                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10045                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10046                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10047                 </links>
10048         </class>
10049
10050         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
10051                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10052                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10053                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10054                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10055                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10056                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10057                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10058                 </fields>
10059                 <links>
10060                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10061                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10062                 </links>
10063         </class>
10064
10065         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
10066                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10067                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10068                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10069                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10070                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10071                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10072                 </fields>
10073                 <links>
10074                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10075                 </links>
10076         </class>
10077
10078         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
10079                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10080                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10081                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10082                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10083                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10084                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10085                 </fields>
10086                 <links>
10087                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10088                 </links>
10089         </class>
10090
10091         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
10092                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10093                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10094                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10095                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10096                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10097                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10098                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10099                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10100                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10101                 </fields>
10102                 <links>
10103                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10104                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10105                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10106                 </links>
10107         </class>
10108
10109         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
10110                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10111                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10112                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10113                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10114                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10115                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10116                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10117                 </fields>
10118                 <links>
10119                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10120                 </links>
10121         </class>
10122
10123         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
10124                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10125                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10126                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10127                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10128                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10129                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10130                 </fields>
10131                 <links>
10132                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10133                 </links>
10134         </class>
10135
10136         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10137                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10138                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10139                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10140                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10141                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10142                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10143                 </fields>
10144                 <links>
10145                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10146                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10147                 </links>
10148         </class>
10149
10150         <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">
10151                 <fields oils_persist:primary="id">
10152                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10153                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10154                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10155                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10156                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10157                 </fields>
10158                 <links>
10159                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10160                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10161                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10162                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10163                 </links>
10164         </class>
10165
10166         <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">
10167                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10168                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10169                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10170                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10171                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10172                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10173                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10174                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10175                 </fields>
10176                 <links/>
10177                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10178                         <actions>
10179                                 <retrieve/>
10180                         </actions>
10181                 </permacrud>
10182         </class>
10183
10184         <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">
10185                 <fields oils_persist:primary="ptype_key">
10186                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10187                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10188                 </fields>
10189                 <links/>
10190                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10191                         <actions>
10192                                 <retrieve/>
10193                         </actions>
10194                 </permacrud>
10195         </class>
10196
10197         <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">
10198                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10199                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10200                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10201                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10202                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10203                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10204                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10205                 </fields>
10206                 <links>
10207                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10208                 </links>
10209                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10210                         <actions>
10211                                 <retrieve/>
10212                         </actions>
10213                 </permacrud>
10214         </class>
10215
10216         <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">
10217                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10218                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10219                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10220                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10221                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10222                 </fields>
10223                 <links>
10224                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10225                 </links>
10226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10227                         <actions>
10228                                 <retrieve/>
10229                         </actions>
10230                 </permacrud>
10231         </class>
10232
10233     <class
10234         id="uvs"
10235         controller="open-ils.cstore open-ils.pcrud"
10236         oils_obj:fieldmapper="url_verify::session"
10237         oils_persist:tablename="url_verify.session"
10238         reporter:label="URL Verification Session"
10239     >
10240         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10241             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10242             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10243                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10244             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10245             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10246             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10247             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10248             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10249             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10250         </fields>
10251
10252         <links>
10253             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10254             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10255             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10256             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10257             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10258         </links>
10259
10260         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10261             <actions>
10262                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10263             </actions>
10264         </permacrud>
10265
10266     </class>
10267
10268     <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">
10269         <oils_persist:source_definition>
10270             SELECT
10271                 cbrebi.id AS id,  -- so we can have a pkey in our view
10272                 uvs.id AS session,
10273                 uvs.owning_lib,
10274                 cbrebi.target_biblio_record_entry
10275             FROM url_verify.session uvs
10276             JOIN container.biblio_record_entry_bucket cbreb
10277                 ON (uvs.container = cbreb.id)
10278             JOIN container.biblio_record_entry_bucket_item cbrebi
10279                 ON (cbrebi.bucket = cbreb.id)
10280         </oils_persist:source_definition>
10281         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10282             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10283             <field reporter:label="Session" name="session" reporter:datatype="link" />
10284             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10285             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10286         </fields>
10287         <links>
10288             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10289             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10290             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10291         </links>
10292         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10293             <actions>
10294                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10295             </actions>
10296         </permacrud>
10297     </class>
10298
10299     <class
10300         id="uvus"
10301         controller="open-ils.cstore open-ils.pcrud"
10302         oils_obj:fieldmapper="url_verify::url_selector"
10303         oils_persist:tablename="url_verify.url_selector"
10304         reporter:label="URL Verification URL Selector"
10305     >
10306         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10307             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10308             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10309                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10310             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10311         </fields>
10312
10313         <links>
10314             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10315             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10316         </links>
10317
10318         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10319             <actions>
10320                 <create permission="URL_VERIFY">
10321                     <context link="session" field="owning_lib"/>
10322                 </create>
10323                 <retrieve permission="URL_VERIFY">
10324                     <context link="session" field="owning_lib"/>
10325                 </retrieve>
10326                 <update permission="URL_VERIFY">
10327                     <context link="session" field="owning_lib"/>
10328                 </update>
10329                 <delete permission="URL_VERIFY">
10330                     <context link="session" field="owning_lib"/>
10331                 </delete>
10332             </actions>
10333         </permacrud>
10334
10335     </class>
10336
10337     <class
10338         id="uvu"
10339         controller="open-ils.cstore open-ils.pcrud"
10340         oils_obj:fieldmapper="url_verify::url"
10341         oils_persist:tablename="url_verify.url"
10342         reporter:label="URL Verification URL"
10343     >
10344         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10345             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10346                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10347                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10348                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10349                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10350             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10351             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10352             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10353             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10354             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10355             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10356             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10357             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10358             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10359             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10360             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10361             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10362             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10363         </fields>
10364
10365         <links>
10366             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10367             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10368             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10369             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10370             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10371         </links>
10372
10373         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10374             <actions>
10375                 <create permission="URL_VERIFY">
10376                     <context link="session" field="owning_lib"/>
10377                 </create>
10378                 <retrieve permission="URL_VERIFY">
10379                     <context link="session" field="owning_lib"/>
10380                 </retrieve>
10381                 <update permission="URL_VERIFY">
10382                     <context link="session" field="owning_lib"/>
10383                 </update>
10384                 <delete permission="URL_VERIFY">
10385                     <context link="session" field="owning_lib"/>
10386                 </delete>
10387             </actions>
10388         </permacrud>
10389
10390     </class>
10391
10392     <class
10393         id="uvva"
10394         controller="open-ils.cstore open-ils.pcrud"
10395         oils_obj:fieldmapper="url_verify::verification_attempt"
10396         oils_persist:tablename="url_verify.verification_attempt"
10397         reporter:label="URL Verification Attempt"
10398     >
10399         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10400             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10401                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10402                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10403             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10404             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10405         </fields>
10406
10407         <links>
10408             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10409             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10410         </links>
10411
10412         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10413             <actions>
10414                 <create permission="URL_VERIFY">
10415                     <context link="session" field="owning_lib"/>
10416                 </create>
10417                 <retrieve permission="URL_VERIFY">
10418                     <context link="session" field="owning_lib"/>
10419                 </retrieve>
10420                 <update permission="URL_VERIFY">
10421                     <context link="session" field="owning_lib"/>
10422                 </update>
10423                 <delete permission="URL_VERIFY">
10424                     <context link="session" field="owning_lib"/>
10425                 </delete>
10426             </actions>
10427         </permacrud>
10428
10429     </class>
10430
10431     <class
10432         id="uvuv"
10433         controller="open-ils.cstore open-ils.pcrud"
10434         oils_obj:fieldmapper="url_verify::url_verification"
10435         oils_persist:tablename="url_verify.url_verification"
10436         reporter:label="URL Verification"
10437     >
10438         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10439             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10440                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10441                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10442             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10443             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10444             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10445             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10446                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10447         </fields>
10448
10449         <links>
10450             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10451             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10452             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10453         </links>
10454
10455         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10456             <actions>
10457                 <create permission="URL_VERIFY">
10458                     <context link="attempt" jump="session" field="owning_lib"/>
10459                 </create>
10460                 <retrieve permission="URL_VERIFY">
10461                     <context link="attempt" jump="session" field="owning_lib"/>
10462                 </retrieve>
10463                 <update permission="URL_VERIFY">
10464                     <context link="attempt" jump="session" field="owning_lib"/>
10465                 </update>
10466                 <delete permission="URL_VERIFY">
10467                     <context link="attempt" jump="session" field="owning_lib"/>
10468                 </delete>
10469             </actions>
10470         </permacrud>
10471
10472     </class>
10473
10474         <class
10475                 id="cfdi"
10476                 controller="open-ils.cstore open-ils.pcrud"
10477                 oils_obj:fieldmapper="config::filter_dialog_interface"
10478                 oils_persist:tablename="config.filter_dialog_interface"
10479                 reporter:label="FilterDialog Interface">
10480                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10481                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10482                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10483                 </fields>
10484                 <links>
10485                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10486                 </links>
10487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10488                         <actions>
10489                                 <retrieve />
10490                         </actions>
10491                 </permacrud>
10492         </class>
10493
10494         <class
10495                 id="cfdfs"
10496                 controller="open-ils.cstore open-ils.pcrud"
10497                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10498                 oils_persist:tablename="config.filter_dialog_filter_set"
10499                 reporter:label="FilterDialog Filter Set">
10500                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10501                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10502                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10503                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10504                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10505                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10506                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10507                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10508                 </fields>
10509                 <links>
10510                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10511                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10512                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10513                 </links>
10514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10515                         <actions>
10516                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10517                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10518                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10519                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10520                         </actions>
10521                 </permacrud>
10522
10523         </class>
10524
10525         <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">
10526                 <fields oils_persist:primary="code">
10527                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10528                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10529                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10530                 </fields>
10531                 <links/>
10532                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10533                         <actions>
10534                                 <retrieve/>
10535                         </actions>
10536                 </permacrud>
10537         </class>
10538
10539         <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">
10540                 <oils_persist:source_definition>
10541
10542             SELECT  b.id,
10543                     MAX(dcp.edit_date) AS last_delete_date
10544              FROM   biblio.record_entry b
10545                     JOIN asset.call_number cn ON (cn.record = b.id)
10546                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10547              WHERE  NOT b.deleted
10548              GROUP BY b.id
10549              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10550
10551                 </oils_persist:source_definition>
10552                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10553                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10554                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10555                 </fields>
10556                 <links>
10557                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10558                 </links>
10559                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10560                         <actions>
10561                                 <retrieve/>
10562                         </actions>
10563                 </permacrud>
10564         </class>
10565
10566         <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">
10567                 <oils_persist:source_definition>
10568
10569             -- -- 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.
10570             -- -- 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
10571             -- -- may not.
10572             -- SELECT
10573             --     bre.id AS bib_id,
10574             --     COALESCE( z.copy_count, 0 ) AS copy_count,
10575             --     COALESCE( z.hold_count, 0 ) AS hold_count,
10576             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
10577             -- FROM (
10578                 SELECT
10579                     y.bre AS id,
10580                     COALESCE( x.copy_count, 0 ) AS copy_count,
10581                     y.hold_count AS hold_count,
10582                     (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
10583                 FROM (
10584                         SELECT
10585                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
10586                             COUNT(*) AS hold_count
10587                         FROM action.hold_request h
10588                         WHERE
10589                             cancel_time IS NULL
10590                             AND fulfillment_time IS NULL
10591                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10592                         GROUP BY 1
10593                     )y LEFT JOIN (
10594                         SELECT 
10595                             (SELECT id
10596                                 FROM biblio.record_entry 
10597                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10598                             ) AS bre, 
10599                             COUNT(*) AS copy_count
10600                         FROM asset.copy
10601                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10602                         WHERE copy.holdable 
10603                             AND NOT copy.deleted 
10604                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10605                         GROUP BY 1
10606                     )x ON x.bre = y.bre
10607                 -- )z RIGHT JOIN (
10608                 --     SELECT id
10609                 --     FROM biblio.record_entry
10610                 --     WHERE NOT deleted
10611                 -- )bre ON (z.bib_id = bre.id)
10612                 
10613
10614                 </oils_persist:source_definition>
10615                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10616                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10617                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10618                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10619                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10620                 </fields>
10621                 <links>
10622                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10623                 </links>
10624                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10625                         <actions>
10626                                 <retrieve/>
10627                         </actions>
10628                 </permacrud>
10629         </class>
10630
10631         <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">
10632                 <oils_persist:source_definition>
10633             SELECT *,
10634                 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,
10635                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10636             FROM
10637                 (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
10638                     FROM
10639                         action.hold_request ahr
10640                         JOIN reporter.hold_request_record rhrr USING (id)
10641                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10642                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10643                     WHERE
10644                         ahr.cancel_time IS NULL
10645                         AND ahr.fulfillment_time IS NULL
10646                     GROUP BY bib_record, pickup_lib
10647                 )x
10648                 JOIN
10649                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10650                     FROM
10651                         action.hold_request ahr
10652                         JOIN reporter.hold_request_record rhrr USING (id)
10653                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10654                     WHERE
10655                         ahr.cancel_time IS NULL
10656                         AND ahr.fulfillment_time IS NULL
10657                     GROUP BY bib_record
10658                 )y
10659                 USING (id)
10660                 </oils_persist:source_definition>
10661                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10662                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10663                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10664                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10665                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10666                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10667                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10668                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10669                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10670                 </fields>
10671                 <links>
10672                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10673                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10674                 </links>
10675                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10676                         <actions>
10677                                 <retrieve/>
10678                         </actions>
10679                 </permacrud>
10680         </class>
10681
10682         <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) ">
10683                 <oils_persist:source_definition>
10684             WITH counts_at_ou AS (
10685                 SELECT bib_record, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library, 
10686                     COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
10687                 FROM action.hold_request ahr
10688                 JOIN reporter.hold_request_record rhrr USING (id)
10689                 LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10690                 LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10691                 WHERE ahr.cancel_time IS NULL
10692                 AND ahr.fulfillment_time IS NULL
10693                 GROUP BY bib_record, pickup_lib
10694             )
10695             SELECT *,
10696                 CASE WHEN copy_count_at_or_below = 0 THEN 'Infinity'::FLOAT ELSE holds_at_or_below::FLOAT/copy_count_at_or_below END AS hold_copy_ratio_at_or_below_ou,
10697                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10698             FROM
10699                 (SELECT bib_record AS id, aou.id AS pickup_lib_or_desc, SUM(holds_at_pickup_library) AS holds_at_or_below, SUM(copy_count_at_pickup_library) AS copy_count_at_or_below
10700                 FROM actor.org_unit aou
10701                 JOIN counts_at_ou cao ON (cao.pickup_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))) 
10702                 GROUP BY bib_record, pickup_lib_or_desc
10703                 )x
10704                 JOIN
10705                 (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10706                     FROM
10707                         action.hold_request ahr
10708                         JOIN reporter.hold_request_record rhrr USING (id)
10709                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10710                     WHERE
10711                         ahr.cancel_time IS NULL
10712                         AND ahr.fulfillment_time IS NULL
10713                     GROUP BY bib_record
10714                 )y
10715                 USING (id)
10716                 </oils_persist:source_definition>
10717                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10718                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10719                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
10720                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
10721                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
10722                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10723                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10724                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
10725                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10726                 </fields>
10727                 <links>
10728                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10729                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
10730                 </links>
10731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10732                         <actions>
10733                                 <retrieve/>
10734                         </actions>
10735                 </permacrud>
10736         </class>
10737
10738         <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">
10739                 <oils_persist:source_definition>
10740             SELECT
10741                 ac.id,
10742                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10743                 MAX(actac.xact_start) AS last_circ
10744             FROM asset.copy ac
10745                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10746             GROUP BY ac.id
10747
10748             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10749             --SELECT
10750             --    ac.id,
10751             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10752             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10753             --FROM asset.copy ac
10754             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10755             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10756             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10757                 </oils_persist:source_definition>
10758                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10759                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10760                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10761                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10762                 </fields>
10763                 <links>
10764                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10765                 </links>
10766                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10767                         <actions>
10768                                 <retrieve/>
10769                         </actions>
10770                 </permacrud>
10771         </class>
10772
10773         <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">
10774                 <fields oils_persist:primary="id">
10775                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10776                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10777                 </fields>
10778                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10779                         <actions>
10780                                 <retrieve/>
10781                         </actions>
10782                 </permacrud>
10783         </class>
10784
10785         <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">
10786                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10787                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10788                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10789                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10790                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10791                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10792                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10793                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10794                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10795                 </fields>
10796                 <links>
10797                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10798                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10799                 </links>
10800                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10801                         <actions>
10802                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10803                                 <retrieve/>
10804                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10805                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10806                         </actions>
10807                 </permacrud>
10808         </class>
10809
10810         <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">
10811                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10812                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10813                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10814                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10815                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10816                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10817                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10818                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10819                 </fields>
10820                 <links>
10821                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10822                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10823                 </links>
10824                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10825                         <actions>
10826                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10827                                 <retrieve/>
10828                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10829                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10830                         </actions>
10831                 </permacrud>
10832         </class>
10833
10834
10835         <!-- ********************************************************************************************************************* -->
10836         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10837         <!-- ********************************************************************************************************************* -->
10838         <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">
10839                 <fields oils_persist:primary="id">
10840                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10841                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10842                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10843                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10844                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10845                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10846                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10847                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10848                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10849                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10850                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10851                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10852                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10853                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10854                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10855                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10856                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10857                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10858                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10859                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10860                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10861                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10862                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10863                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10864                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10865                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10866                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10867                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10868                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10869                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10870                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10871                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10872                 </fields>
10873                 <links>
10874                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10875                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10876                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10877                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10878                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10879                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10880                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10881                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10882                 </links>
10883         </class>
10884
10885         <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">
10886                 <fields oils_persist:primary="id">
10887                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10888                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10889                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10890                 </fields>
10891                 <links>
10892                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10893                 </links>
10894         </class>
10895
10896         <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">
10897                 <fields oils_persist:primary="id">
10898                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10899                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10900                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10901                 </fields>
10902                 <links>
10903                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10904                 </links>
10905         </class>
10906
10907         <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">
10908                 <fields oils_persist:primary="id">
10909                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10910
10911                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10912                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10913                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10914
10915                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10916                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10917                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10918
10919                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10920                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10921
10922                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10923                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10924                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10925
10926                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10927                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10928
10929                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10930                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10931                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10932
10933                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10934                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10935                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10936
10937                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10938                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10939                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10940                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10941
10942                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10943                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10944
10945                 </fields>
10946                 <links>
10947                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10948                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10949                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10950                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10951                 </links>
10952         </class>
10953
10954         <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">
10955                 <oils_persist:source_definition>
10956
10957             SELECT
10958                 po.ordering_agency AS ordering_agency,
10959                 po.id AS purchase_order,
10960                 li.id AS lineitem,
10961                 lid.id AS lineitem_detail,
10962                 cpa.id AS claim_policy_action
10963             FROM
10964                 acq.lineitem_detail lid
10965                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10966                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10967                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10968                 JOIN acq.claim_policy_action cpa ON (
10969                     cpa.claim_policy = cp.id
10970
10971                     -- we only care about claim policy actions whose claim
10972                     -- interval we'd reached or exceeded
10973                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10974
10975                     -- filter out all claim policy actions where claim events
10976                     -- have occurred on or after the action's action_interval
10977                     AND NOT EXISTS (
10978                         SELECT 1
10979                         FROM
10980                             acq.claim_event evt
10981                             JOIN acq.claim claim ON (
10982                                 claim.id = evt.claim
10983                                 AND claim.lineitem_detail = lid.id
10984                             )
10985                         WHERE
10986                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10987                     )
10988                 )
10989             WHERE
10990                 lid.cancel_reason IS NULL
10991                 AND li.cancel_reason IS NULL -- belt/suspenders
10992                 AND po.cancel_reason IS NULL -- belt/suspenders
10993                 AND lid.recv_time IS NULL
10994                 AND po.state = 'on-order'
10995             ORDER BY 1, 2, 3, 4, 5
10996
10997                 </oils_persist:source_definition>
10998                 <fields>
10999                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
11000                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
11001                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11002                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11003                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
11004                 </fields>
11005                 <links>
11006                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
11007                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
11008                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11009                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11010                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
11011                 </links>
11012         </class>
11013         <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">
11014                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11015                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11016                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11017                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11018                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11019                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11020                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11021                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11022                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11023                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11024                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11025                 </fields>
11026                 <links>
11027                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11028                 </links>
11029     </class>
11030         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
11031                 <oils_persist:source_definition>
11032             SELECT * FROM acq.lineitem_summary 
11033                                 WHERE item_count > (invoice_count + cancel_count)
11034         </oils_persist:source_definition>
11035                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11036                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11037                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11038                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11039                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11040                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11041                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11042                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11043                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11044                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11045                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11046                 </fields>
11047                 <links>
11048                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11049                 </links>
11050     </class>
11051         <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">
11052                 <oils_persist:source_definition>
11053
11054                         SELECT  t.*
11055                           FROM  action.transit_copy t
11056                                 JOIN actor.org_unit AS s ON (t.source = s.id)
11057                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
11058                           WHERE s.parent_ou &lt;&gt; d.parent_ou
11059
11060                 </oils_persist:source_definition>
11061                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
11062                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
11063                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
11064                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
11065                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
11066                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
11067                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
11068                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
11069                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
11070                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
11071                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
11072                 </fields>
11073                 <links>
11074                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
11075                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
11076                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
11077                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
11078                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11079                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
11080                 </links>
11081         </class>
11082
11083     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
11084                 <oils_persist:source_definition>
11085
11086         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
11087                 SELECT
11088                         cp.id as copy,
11089                         COUNT(circ.id),
11090                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11091                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11092                 FROM
11093                         asset.copy cp
11094                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
11095                 GROUP BY 1, 3, 4
11096                 UNION ALL
11097                 SELECT
11098                         cp.id as copy,
11099                         COUNT(circ.id),
11100                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11101                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11102                 FROM
11103                         asset.copy cp
11104                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
11105                 GROUP BY 1, 3, 4
11106                 UNION ALL
11107                 SELECT
11108                         id as copy,
11109                         circ_count,
11110                         -1 AS year,
11111                         false as is_renewal
11112                 FROM
11113                         extend_reporter.legacy_circ_count
11114         )x GROUP BY 1, 3, 4
11115
11116                 </oils_persist:source_definition>
11117         <fields>
11118             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
11119             <field reporter:label="Count" name="count" reporter:datatype="int"/>
11120             <field reporter:label="Year" name="year" reporter:datatype="int"/>
11121             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
11122         </fields>
11123                 <links>
11124                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11125                 </links>
11126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11127                         <actions>
11128                                 <retrieve/>
11129                         </actions>
11130                 </permacrud>
11131     </class>
11132
11133         <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">
11134                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
11135                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
11136                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
11137                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
11138                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
11139                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
11140                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
11141                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
11142                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
11143                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
11144                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
11145                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
11146                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
11147                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
11148                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
11149                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
11150                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
11151                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
11152                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
11153                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
11154                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
11155                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
11156                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
11157                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
11158                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
11159                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
11160                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
11161                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
11162                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
11163                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
11164                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
11165                 </fields>
11166                 <links>
11167                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
11168                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
11169                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
11170                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11171                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
11172                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11173                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11174                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
11175                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
11176                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
11177                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
11178                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
11179                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
11180                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
11181                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
11182                 </links>
11183         </class>
11184
11185     <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">
11186         <fields oils_persist:primary="id">
11187             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11188             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11189             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11190             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11191             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11192             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11193             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11194             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11195             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11196             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11197             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11198             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11199             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11200             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11201             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11202             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11203             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11204             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11205             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11206             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11207             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11208             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11209             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11210             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11211             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11212             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11213             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11214             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11215             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11216             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11217             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11218             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11219             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11220             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11221         </fields>
11222         <links>
11223             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11224             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11225             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11226             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11227             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11228             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11229             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11230             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11231         </links>
11232     </class>
11233
11234     <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">
11235         <fields oils_persist:primary="id">
11236             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11237             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11238             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11239             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11240         </fields>
11241         <links>
11242             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11243             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11244         </links>
11245     </class>
11246
11247     <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">
11248         <fields oils_persist:primary="owning_lib">
11249             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11250             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11251             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11252         </fields>
11253         <links>
11254             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11255         </links>
11256     </class>
11257
11258     <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">
11259         <fields oils_persist:primary="id">
11260             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11261             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11262             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11263             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11264             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11265         </fields>
11266         <links>
11267             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11268             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11269             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11270         </links>
11271     </class>
11272
11273     <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">
11274         <fields oils_persist:primary="circ_lib">
11275             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11276             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11277             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11278             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11279         </fields>
11280         <links>
11281             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11282             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11283         </links>
11284     </class>
11285
11286     <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">
11287         <fields oils_persist:primary="id">
11288             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11289             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11290             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11291             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11292             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11293         </fields>
11294         <links>
11295             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11296             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11297             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11298         </links>
11299     </class>
11300
11301     <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">
11302         <fields oils_persist:primary="home_ou">
11303             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11304             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11305             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11306             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11307         </fields>
11308         <links>
11309             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11310             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11311         </links>
11312     </class>
11313         <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">
11314                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11315                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11316                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11317                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11318                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11319                 </fields>
11320                 <links>
11321                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11322                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11323                 </links>
11324                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11325                         <actions>
11326                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11327                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11328                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11329                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11330                         </actions>
11331                 </permacrud>
11332         </class>
11333         <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">
11334                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11335                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11336                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11337                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11338                 </fields>
11339                 <links>
11340                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11341                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11342                         </links>
11343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11344                 <actions>
11345                                 <create permission="ADMIN_ACQ_FUND_TAG">
11346                                         <context link="tag" field="owner"/>
11347                                 </create>
11348                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11349                                         <context link="tag" field="owner"/>
11350                                 </retrieve>
11351                                 <update permission="ADMIN_ACQ_FUND_TAG">
11352                                         <context link="tag" field="owner"/>
11353                                 </update>
11354                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11355                                         <context link="tag" field="owner"/>
11356                                 </delete>
11357                         </actions>
11358                 </permacrud>
11359         </class>
11360         <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">
11361                 <oils_persist:source_definition><![CDATA[
11362                 SELECT
11363                         poi.purchase_order AS purchase_order,
11364                         ii.invoice AS invoice,
11365                         NULL AS lineitem,
11366                         poi.id AS po_item,
11367                         NULL AS picklist
11368                 FROM
11369                         acq.po_item poi
11370                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11371                 UNION SELECT
11372                         jub.purchase_order AS purchase_order,
11373                         ie.invoice AS invoice,
11374                         jub.id AS lineitem,
11375                         NULL AS po_item,
11376                         jub.picklist AS picklist
11377                 FROM
11378                         acq.lineitem jub
11379                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11380                 UNION SELECT
11381                         ii.purchase_order AS purchase_order,
11382                         ii.invoice AS invoice,
11383                         NULL AS lineitem,
11384                         NULL AS po_item,
11385                         NULL AS picklist
11386                 FROM
11387                         acq.invoice_item ii
11388                 WHERE ii.po_item IS NULL
11389                 UNION SELECT
11390                         ie.purchase_order AS purchase_order,
11391                         ie.invoice AS invoice,
11392                         NULL AS lineitem,
11393                         NULL AS po_item,
11394                         NULL AS picklist
11395                 FROM
11396                         acq.invoice_entry ie
11397                 WHERE ie.lineitem IS NULL
11398                 UNION SELECT
11399                         NULL AS purchase_order,
11400                         NULL AS invoice,
11401                         jub.id AS lineitem,
11402                         NULL AS po_item,
11403                         jub.picklist AS picklist
11404                 FROM
11405                         acq.lineitem jub
11406                 WHERE jub.purchase_order IS NULL
11407                 ]]></oils_persist:source_definition>
11408                 <fields>
11409                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11410                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11411                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11412                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11413                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11414                 </fields>
11415                 <links>
11416                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11417                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11418                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11419                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11420                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11421                 </links>
11422         </class>
11423         <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">
11424                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11425                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11426                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11427                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11428                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11429                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11430                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11431                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11432                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11433                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11434                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11435                 </fields>
11436                 <links>
11437                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11438                 </links>
11439                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11440                         <actions>
11441                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11442                                 <retrieve/>
11443                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11444                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11445                         </actions>
11446                 </permacrud>
11447         </class>
11448
11449         <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">
11450                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11451                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11452                         <field name="date_applied" reporter:datatype="timestamp"/>
11453                         <field name="org" reporter:datatype="org_unit"/>
11454                         <field name="original_value" reporter:datatype="text"/>
11455                         <field name="new_value" reporter:datatype="text"/>
11456                         <field name="field_name" reporter:datatype="link"/>
11457                 </fields>
11458                 <links>
11459                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11460                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11461                 </links>
11462                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11463                         <actions>
11464                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11465                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11466                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11467                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11468                         </actions>
11469                 </permacrud>
11470         </class>
11471         <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">
11472                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11473                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11474                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11475                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11476                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11477                 </fields>
11478                 <links>
11479                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11480                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11481                 </links>
11482         </class>
11483         <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">
11484                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11485                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11486                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11487                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11488                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11489                 </fields>
11490                 <links>
11491                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11492                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11493                 </links>
11494         </class>
11495         <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">
11496                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11497                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11498                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11499                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11500                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11501                 </fields>
11502                 <links>
11503                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11504                 </links>
11505                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11506                         <actions>
11507                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11508                                 <retrieve/>
11509                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11510                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11511                         </actions>
11512                 </permacrud>
11513         </class>
11514         <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">
11515                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11516                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11517                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11518                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11519                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11520                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11521                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11522                 </fields>
11523                 <links>
11524                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11525                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11526                 </links>
11527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11528                         <actions>
11529                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11530                                 <retrieve/>
11531                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11532                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11533                         </actions>
11534                 </permacrud>
11535         </class>
11536         <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">
11537         <oils_persist:source_definition>
11538         SELECT ahcm.target_copy AS id,count(*) AS count
11539          FROM
11540          action.hold_request ahr,
11541          action.hold_copy_map ahcm
11542          WHERE
11543          ahr.cancel_time IS NULL AND
11544          ahr.fulfillment_time IS NULL AND
11545          ahr.capture_time IS NULL AND
11546          ahr.id = ahcm.hold
11547          GROUP BY ahcm.target_copy
11548         </oils_persist:source_definition>
11549         <fields oils_persist:primary="id">
11550             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11551             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
11552         </fields>
11553         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11554             <actions>
11555                <retrieve/>
11556             </actions>
11557         </permacrud>
11558         </class>
11559
11560         <!-- ********************************************************************************************************************* -->
11561
11562 </IDL>
11563
11564 <!--
11565     vim:noet:ts=4:sw=4:
11566 -->