]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
d0cfb000e3e815685e3e08353aaedf9d7c8eaaf3
[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             <field name="checkout_ok" reporter:datatype="bool"/>
3898                 </fields>
3899                 <links/>
3900         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3901             <actions>
3902                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3903                 <retrieve/>
3904                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3905                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3906             </actions>
3907         </permacrud>
3908         </class>
3909         <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">
3910                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3911                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3912                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3913                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3914                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3915                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3916                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3917                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3918                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3919                 </fields>
3920                 <links>
3921                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3922                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3923                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3924                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3925                 </links>
3926                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3927                         <actions>
3928                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3929                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3930                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3931                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3932                         </actions>
3933                 </permacrud>
3934         </class>
3935         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3936                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3937                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3938                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3939                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3940                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3941                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3942                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3943                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3944                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3945                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3946                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3947                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3948                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3949                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3950                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3951                 </fields>
3952                 <links>
3953                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3954                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3955                 </links>
3956         </class>
3957         <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">
3958                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3959                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3960                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3961                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3962                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3963                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3964                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3965                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3966                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3967                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3968                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3969                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3970                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3971                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3972                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3973                 </fields>
3974                 <links>
3975                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3976                 </links>
3977                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3978                         <actions>
3979                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3980                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3981                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3982                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3983                         </actions>
3984                 </permacrud>
3985         </class>
3986
3987
3988         <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">
3989                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3990                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3991                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3992                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3993                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3994                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3995                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3996                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3997                 </fields>
3998                 <links>
3999                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4000                 </links>
4001         </class>
4002
4003         <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">
4004                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4005                         <field name="call_number" />
4006                         <field name="create_date" reporter:datatype="timestamp"/>
4007                         <field name="creator" reporter:datatype="link"/>
4008                         <field name="id" reporter:datatype="id" />
4009                         <field name="pub" reporter:datatype="bool"/>
4010                         <field name="title"  reporter:datatype="text"/>
4011                         <field name="value"  reporter:datatype="text"/>
4012                 </fields>
4013                 <links>
4014                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4015                 </links>
4016         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4017             <actions>
4018                 <create permission="CREATE_VOLUME_NOTE">
4019                     <context link="call_number" field="owning_lib"/>
4020                 </create>
4021                 <retrieve permission="VIEW_VOLUME_NOTES">
4022                     <context link="call_number" field="owning_lib"/>
4023                 </retrieve>
4024                 <update permission="UPDATE_VOLUME_NOTE">
4025                     <context link="call_number" field="owning_lib"/>
4026                 </update>
4027                 <delete permission="DELETE_VOLUME_NOTE">
4028                     <context link="call_number" field="owning_lib"/>
4029                 </delete>
4030             </actions>
4031         </permacrud>
4032         </class>
4033         <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">
4034                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4035                         <field name="create_date" reporter:datatype="timestamp"/>
4036                         <field name="creator" reporter:datatype="link"/>
4037                         <field name="edit_date" reporter:datatype="timestamp"/>
4038                         <field name="editor" reporter:datatype="link"/>
4039                         <field name="id" reporter:datatype="id" />
4040                         <field name="record" reporter:datatype="link"/>
4041                         <field name="value" reporter:datatype="text"/>
4042                 </fields>
4043                 <links>
4044                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4045                 </links>
4046         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4047             <actions>
4048                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4049                 <retrieve/>
4050                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4051                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4052             </actions>
4053         </permacrud>
4054         </class>
4055         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4056         <oils_persist:source_definition>
4057 SELECT  usr,
4058         SUM(
4059             CASE
4060                 WHEN (
4061                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4062                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4063                 ) THEN 1
4064                 ELSE 0
4065             END
4066         ) AS out,
4067
4068         SUM(
4069             CASE
4070                 WHEN (
4071                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4072                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4073                 ) THEN 1
4074                 ELSE 0
4075             END
4076         ) AS overdue,
4077
4078         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4079         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4080         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4081   FROM  action.circulation
4082   WHERE checkin_time IS NULL
4083   GROUP BY 1
4084         </oils_persist:source_definition>
4085         <fields oils_persist:primary="usr">
4086             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4087             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4088             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4089             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4090             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4091             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4092         </fields>
4093         <links>
4094             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4095         </links>
4096         </class>
4097         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4098         <oils_persist:source_definition>
4099 SELECT  usr,
4100         STRING_AGG(
4101             CASE
4102                 WHEN (
4103                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4104                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4105                 ) THEN id::TEXT
4106                 ELSE '0'
4107             END
4108         ,',') AS out,
4109
4110         STRING_AGG(
4111             CASE
4112                 WHEN (
4113                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4114                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4115                 ) THEN id::TEXT
4116                 ELSE '0'
4117             END
4118         ,',') AS overdue,
4119
4120         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4121         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4122         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4123   FROM  action.circulation
4124   WHERE checkin_time IS NULL
4125   GROUP BY 1
4126         </oils_persist:source_definition>
4127         <fields oils_persist:primary="usr">
4128             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4129             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4130             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4131             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4132             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4133             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4134         </fields>
4135         <links>
4136             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4137         </links>
4138         </class>
4139         <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">
4140                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4141                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4142                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4143                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4144                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4145                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4146                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4147                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4148                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4149                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4150                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4151                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4152                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4153                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4154                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4155                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4156                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4157                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4158                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4159                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4160                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4161                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4162                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4163                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4164                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4165                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4166                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4167                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4168                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4169                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4170                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4171                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4172                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4173                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4174                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4175                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4176                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4177                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4178                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4179                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4180                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4181                 </fields>
4182                 <links>
4183                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4184                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4185                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4186                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4187                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4188                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4189                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4190                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4191                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4192                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4193                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4194                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4195                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4196                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4197                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4198                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4199                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4200                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4201                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4202                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4203                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4204                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4205                 </links>
4206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4207                         <actions>
4208                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4209                         </actions>
4210                 </permacrud>
4211         </class>
4212         <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">
4213                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4214                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4215                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4216                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4217                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4218                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4219                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4220                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4221                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4222                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4223                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4224                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4225                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4226                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4227                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4228                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4229                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4230                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4231                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4232                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4233                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4234                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4235                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4236                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4237                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4238                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4239                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4240                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4241                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4242                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4243                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4244                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4245                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4246                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4247                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4248                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4249                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4250                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4251                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4252                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4253                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4254                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4255                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4256                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4257                 </fields>
4258                 <links>
4259                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4260                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4261                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4262                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4263                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4264                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4265                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4266                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4267                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4268                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4269                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4270                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4271                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4272                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4273                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4274                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4275                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4276                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4277                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4278                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4279                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4280                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4281                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4282                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4283                 </links>
4284         </class>
4285         <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">
4286                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4287                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4288                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4289                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4290                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4291                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4292                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4293                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4294                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4295                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4296                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4297                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4298                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4299                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4300                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4301                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4302                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4303                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4304                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4305                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4306                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4307                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4308                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4309                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4310                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4311                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4312                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4313                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4314                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4315                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4316                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4317                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4318                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4319                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4320                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4321                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4322                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4323                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4324                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4325                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4326                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4327                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4328                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4329                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4330                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4331                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4332                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4333                 </fields>
4334                 <links>
4335                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4336                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4337                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4338                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4339                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4340                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4341                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4342                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4343                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4344                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4345                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4346                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4347                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4348                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4349                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4350                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4351                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4352                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4353                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4354                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4355                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4356                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4357                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4358                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4359                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4360                 </links>
4361         </class>
4362         <class id="auch" 
4363                 controller="open-ils.cstore" 
4364                 oils_obj:fieldmapper="action::user_circ_history" 
4365                 oils_persist:tablename="action.usr_circ_history" 
4366                 reporter:label="User Checkout History">
4367                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4368                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4369                         <!-- prevent reporting on the user that owns the checkout history -->
4370                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4371                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4372                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4373                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4374                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4375                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4376                 </fields>
4377                 <links>
4378                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4379                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4380                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4381                 </links>
4382         </class>
4383         <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">
4384                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4385                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4386                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4387                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4388                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4389                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4390                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4391                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4392                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4393                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4394                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4395                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4396                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4397                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4398                 </fields>
4399                 <links>
4400                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4401                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4402                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4403                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4404                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4405                 </links>
4406                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4407                         <actions>
4408                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4409                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4410                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4411                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4412                         </actions>
4413                 </permacrud>
4414         </class>
4415
4416         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4417                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4418                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4419                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4420                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4421                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4422                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4423                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4424                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4425                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4426                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4427                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4428                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4429                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4430                 </fields>
4431                 <links>
4432                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4433                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4434                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4435                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4436                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4437                 </links>
4438                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4439                         <actions>
4440                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4441                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4442                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4443                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4444                         </actions>
4445                 </permacrud>
4446         </class>
4447         
4448         <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">
4449                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4450                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4451                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4452                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4453                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4454                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4455                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4456                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4457                 </fields>
4458                 <links>
4459                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4460                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4461                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4462                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4463                 </links>
4464                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4465                         <actions>
4466                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4467                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4468                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4469                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4470                         </actions>
4471                 </permacrud>
4472         </class>
4473         
4474         <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">
4475                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4476                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4477                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4478                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4479                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4480                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4481                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4482                 </fields>
4483                 <links>
4484                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4485                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4486                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4487                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4488                 </links>
4489                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4490                         <actions>
4491                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4492                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4493                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4494                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4495                         </actions>
4496                 </permacrud>
4497         </class>
4498         
4499         <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">
4500                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4501                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4502                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4503                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4504                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4505                 </fields>
4506                 <links>
4507                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4508                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4509                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4510                 </links>
4511                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4512                         <actions>
4513                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4514                     <context link="resource" field="owner" />
4515                 </create>
4516                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4517                     <context link="resource" field="owner" />
4518                 </retrieve>
4519                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4520                     <context link="resource" field="owner" />
4521                 </update>
4522                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4523                     <context link="resource" field="owner" />
4524                 </delete>
4525                         </actions>
4526                 </permacrud>
4527         </class>
4528         
4529         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4530                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4531                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4532                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4533                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4534                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4535                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4536                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4537                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4538                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4539                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4540                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4541                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4542                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4543                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4544                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4545                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4546                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4547                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4548                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4549                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4550                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4551                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4552                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4553                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4554                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4555                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4556                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4557                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4558                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4559                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4560                 </fields>
4561                 <links>
4562                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4563                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4564                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4565                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4566                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4567                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4568                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4569                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4570                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4571                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4572                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4573                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4574                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4575                 </links>
4576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4577                         <actions>
4578                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4579                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4580                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4581                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4582                         </actions>
4583                 </permacrud>
4584         </class>
4585         
4586         <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">
4587                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4588                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4589                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4590                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4591                 </fields>
4592                 <links>
4593                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4594                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4595                 </links>
4596                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4597                         <actions>
4598                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4599                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4600                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4601                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4602                         </actions>
4603                 </permacrud>
4604         </class>
4605
4606         <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">
4607                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4608                         <field name="bucket" reporter:datatype="link"/>
4609                         <field name="id" reporter:datatype="id" />
4610                         <field name="target_call_number" reporter:datatype="link" />
4611                         <field name="create_time" reporter:datatype="timestamp" />
4612                         <field name="pos" reporter:datatype="int" />
4613                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4614                 </fields>
4615                 <links>
4616                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4617                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4618             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4619                 </links>
4620         </class>
4621         <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">
4622                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4623                         <field name="id" reporter:datatype="id" />
4624                         <field name="item" reporter:datatype="link"/>
4625                         <field name="note" reporter:datatype="text" />
4626                 </fields>
4627                 <links>
4628                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4629                 </links>
4630         </class>
4631         <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">
4632                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4633                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4634                         <field name="btype" reporter:datatype="text"/>
4635                         <field name="id" reporter:datatype="id" />
4636                         <field name="name" reporter:datatype="text"/>
4637                         <field name="description" reporter:datatype="text"/>
4638                         <field name="owner" reporter:datatype="link"/>
4639                         <field name="pub" reporter:datatype="bool"/>
4640                         <field name="create_time" reporter:datatype="timestamp" />
4641                 </fields>
4642                 <links>
4643                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4644                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4645                 </links>
4646         </class>
4647         <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">
4648                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4649                         <field name="id" reporter:datatype="id" />
4650                         <field name="bucket" reporter:datatype="link"/>
4651                         <field name="note" reporter:datatype="text" />
4652                 </fields>
4653                 <links>
4654                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4655                 </links>
4656         </class>
4657         <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">
4658                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4659                         <field name="hold" reporter:datatype="link"/>
4660                         <field name="id" reporter:datatype="id" />
4661                         <field name="target_copy" reporter:datatype="link"/>
4662                         <field name="proximity" reporter:datatype="number"/>
4663                 </fields>
4664                 <links>
4665                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4666                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4667                 </links>
4668         </class>
4669         <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">
4670                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4671                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4672                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4673                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4674                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4675                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4676                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4677                 </fields>
4678                 <links>
4679                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4680                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4681                 </links>
4682         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4683             <actions>
4684                 <create permission="CREATE_HOLD_NOTIFICATION">
4685                                         <context link="hold" jump="usr" field="home_ou" />
4686                                 </create>
4687                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4688                                         <context link="hold" jump="usr" field="home_ou" />
4689                                 </retrieve>
4690                 <update permission="CREATE_HOLD_NOTIFICATION">
4691                                         <context link="hold" jump="usr" field="home_ou" />
4692                                 </update>
4693                 <delete permission="CREATE_HOLD_NOTIFICATION">
4694                                         <context link="hold" jump="usr" field="home_ou" />
4695                                 </delete>
4696             </actions>
4697         </permacrud>
4698         </class>
4699         <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">
4700                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4701                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4702                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4703                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4704                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4705                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4706                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4707                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4708                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4709                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4710                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4711                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4712                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4713                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4714                 </fields>
4715                 <links>
4716                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4717                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4718                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4719                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4720                 </links>
4721         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4722             <actions>
4723                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4724                 <retrieve/>
4725                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4726                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4727             </actions>
4728         </permacrud>
4729         </class>
4730         <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">
4731                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4732                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4733                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4734                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4735                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4736             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4737             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4738             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4739                 </fields>
4740                 <links>
4741                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4742                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4743                 </links>
4744         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4745             <actions>
4746                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4747                 <retrieve/>
4748                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4749                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4750             </actions>
4751         </permacrud>
4752         </class>
4753         <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">
4754                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4755                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4756             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4757             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4758                 </fields>
4759                 <links>
4760                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4761                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4762                 </links>
4763         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4764             <actions>
4765                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4766                                         <context link="lgroup" field="owner" />
4767                 </create>
4768                 <retrieve/>
4769                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4770                                         <context link="lgroup" field="owner" />
4771                 </update>
4772                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4773                                         <context link="lgroup" field="owner" />
4774                 </delete>
4775             </actions>
4776         </permacrud>
4777         </class>
4778
4779     <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">
4780         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4781             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4782             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4783             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4784             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4785         </fields>
4786         <links>
4787             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4788             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4789         </links>
4790         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4791             <actions>
4792                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4793                 <retrieve/>
4794                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4795                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4796             </actions>
4797         </permacrud>
4798     </class>
4799
4800         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4801                 <fields>
4802                         <field name="sre_id" oils_persist:virtual="true" />
4803                         <field name="location" oils_persist:virtual="true" />
4804                         <field name="owning_lib" oils_persist:virtual="true" />
4805                         <field name="basic_holdings" oils_persist:virtual="true" />
4806                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4807                         <field name="supplement_holdings" oils_persist:virtual="true" />
4808                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4809                         <field name="index_holdings" oils_persist:virtual="true" />
4810                         <field name="index_holdings_add" oils_persist:virtual="true" />
4811                         <field name="online" oils_persist:virtual="true" />
4812                         <field name="missing" oils_persist:virtual="true" />
4813                         <field name="incomplete" oils_persist:virtual="true" />
4814                 </fields>
4815         </class>
4816
4817         <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">
4818                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4819                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4820                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4821                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4822                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4823                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4824                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4825                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4826                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4827                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4828                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4829                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4830                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4831                 </fields>
4832                 <links>
4833                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4834                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4835                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4836                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4837                 </links>
4838                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4839                         <actions>
4840                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4841                                 <retrieve/>
4842                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4843                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4844                         </actions>
4845                 </permacrud>
4846         </class>
4847
4848         <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">
4849                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4850                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4851                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4852                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4853                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4854                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4855                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4856                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4857                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4858                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4859                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4860                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4861                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4862                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4863                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4864                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4865                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4866                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4867                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4868                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4869                 </fields>
4870                 <links>
4871                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4872                 </links>
4873                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4874                         <actions>
4875                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4876                                         <context link="subscription" field="owning_lib" />
4877                                 </create>
4878                                 <retrieve />
4879                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4880                                         <context link="subscription" field="owning_lib" />
4881                                 </update>
4882                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4883                                         <context link="subscription" field="owning_lib" />
4884                                 </delete>
4885                         </actions>
4886                 </permacrud>
4887         </class>
4888
4889         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4890                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4891                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4892                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4893                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4894                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4895                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4896                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4897                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4898                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4899                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4900                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4901                 </fields>
4902                 <links>
4903                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4904                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4905                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4906                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4907                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4908                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4909                 </links>
4910                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4911                         <actions>
4912                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4913                                 <retrieve />
4914                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4915                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4916                         </actions>
4917                 </permacrud>
4918         </class>
4919
4920         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4921                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4922                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4923                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4924                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4925                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4926                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4927                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4928                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4929                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4930                 </fields>
4931                 <links>
4932                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4933                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4934                 </links>
4935         </class>
4936
4937         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4938                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4939                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4940                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4941                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4942                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4943                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4944                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4945                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4946                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4947                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4948                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4949                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4950                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4951                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4952                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4953                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4954                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4955                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4956                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4957                 </fields>
4958                 <links>
4959                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4960                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4961                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4962                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4963                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4964                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4965                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4966                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4967                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4968                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4969                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4970                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4971                 </links>
4972                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4973                         <actions>
4974                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4975                                 <retrieve />
4976                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4977                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4978                         </actions>
4979                 </permacrud>
4980         </class>
4981
4982         <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">
4983                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4984                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4985                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4986                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4987                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4988                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4989                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4990                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4991                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4992                 </fields>
4993                 <links>
4994                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4995                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4996                 </links>
4997                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4998                         <actions>
4999                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5000                                         <context link="distribution" field="holding_lib" />
5001                                 </create>
5002                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5003                                         <context link="distribution" field="holding_lib" />
5004                                 </retrieve>
5005                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5006                                         <context link="distribution" field="holding_lib" />
5007                                 </update>
5008                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5009                                         <context link="distribution" field="holding_lib" />
5010                                 </delete>
5011                         </actions>
5012                 </permacrud>
5013         </class>
5014
5015         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5016                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5017                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5018                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5019                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5020                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5021                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5022                 </fields>
5023                 <links>
5024                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5025                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
5026                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5027                 </links>
5028                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5029                         <actions>
5030                                 <create permission="ADMIN_SERIAL_STREAM">
5031                                         <context link="distribution" field="holding_lib" />
5032                                 </create>
5033                                 <retrieve />
5034                                 <update permission="ADMIN_SERIAL_STREAM">
5035                                         <context link="distribution" field="holding_lib" />
5036                                 </update>
5037                                 <delete permission="ADMIN_SERIAL_STREAM">
5038                                         <context link="distribution" field="holding_lib" />
5039                                 </delete>
5040                         </actions>
5041                 </permacrud>
5042         </class>
5043
5044         <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">
5045                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5046                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5047                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5048                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5049                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5050                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5051                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5052                 </fields>
5053                 <links>
5054                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5055                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5056                 </links>
5057                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5058                         <actions>
5059                                 <create permission="ADMIN_SERIAL_STREAM">
5060                                         <context link="stream" jump="distribution" field="holding_lib" />
5061                                 </create>
5062                                 <retrieve permission="RECEIVE_SERIAL">
5063                                         <context link="stream" jump="distribution" field="holding_lib" />
5064                                 </retrieve>
5065                                 <update permission="ADMIN_SERIAL_STREAM">
5066                                         <context link="stream" jump="distribution" field="holding_lib" />
5067                                 </update>
5068                                 <delete permission="ADMIN_SERIAL_STREAM">
5069                                         <context link="stream" jump="distribution" field="holding_lib" />
5070                                 </delete>
5071                         </actions>
5072                 </permacrud>
5073         </class>
5074
5075         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5076                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5077                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5078                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5079                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5080                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5081                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5082                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5083                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5084                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5085                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5086                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5087                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5088                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5089                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5090                 </fields>
5091                 <links>
5092                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5093                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5094                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5095                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5096                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5097                 </links>
5098                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5099                         <actions>
5100                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5101                                         <context link="subscription" field="owning_lib" />
5102                                 </create>
5103                                 <retrieve/>
5104                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5105                                         <context link="subscription" field="owning_lib" />
5106                                 </update>
5107                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5108                                         <context link="subscription" field="owning_lib" />
5109                                 </delete>
5110                         </actions>
5111                 </permacrud>
5112         </class>
5113
5114         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5115                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5116                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5117                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5118                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5119                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5120                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5121                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5122                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5123                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5124                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5125                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5126                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5127                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5128                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5129                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5130                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5131                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5132                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5133                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5134                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5135                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5136                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5137                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5138                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5139                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5140                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5141                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5142                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5143                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5144                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5145                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5146                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5147                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5148                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5149                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5150                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5151                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5152                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5153                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5154                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5155                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5156                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5157                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5158                 </fields>
5159                 <links>
5160                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5161                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5162                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5163                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5164                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5165                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5166                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5167                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5168                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5169                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5170                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5171                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5172                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5173                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5174                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5175                 </links>
5176                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5177                         <actions>
5178                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5179                                 <retrieve/>
5180                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5181                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5182                         </actions>
5183                 </permacrud>
5184         </class>
5185
5186         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5187                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5188                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5189                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5190                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5191                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5192                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5193                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5194                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5195                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5196                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5197                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5198                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5199                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5200                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5201                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5202                 </fields>
5203                 <links>
5204                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5205                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5206                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5207                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5208                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5209                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5210                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5211                 </links>
5212                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5213                         <actions>
5214                                 <create permission="ADMIN_SERIAL_ITEM">
5215                                         <context link="stream" jump="distribution" field="holding_lib" />
5216                                 </create>
5217                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5218                                         <context link="stream" jump="distribution" field="holding_lib" />
5219                                 </retrieve>
5220                                 <update permission="ADMIN_SERIAL_ITEM">
5221                                         <context link="stream" jump="distribution" field="holding_lib" />
5222                                 </update>
5223                                 <delete permission="ADMIN_SERIAL_ITEM">
5224                                         <context link="stream" jump="distribution" field="holding_lib" />
5225                                 </delete>
5226                         </actions>
5227                 </permacrud>
5228         </class>
5229
5230         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5231                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5232                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5233                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5234                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5235                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5236                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5237                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5238                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5239                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5240                 </fields>
5241                 <links>
5242                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5243                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5244                 </links>
5245                 <!-- Not available via PCRUD at this time -->
5246         </class>
5247         <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">
5248                 <fields>
5249                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5250                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5251                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5252                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5253                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5254                 </fields>
5255                 <links>
5256                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5257                 </links>
5258         </class>
5259         <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">
5260                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5261                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5262                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5263                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5264                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5265                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5266                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5267                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5268                 </fields>
5269                 <links>
5270                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5271                 </links>
5272         </class>
5273         <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">
5274                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5275                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5276                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5277                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5278                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5279                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5280                 </fields>
5281                 <links>
5282                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5283                 </links>
5284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5285                         <actions>
5286                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5287                                         <context link="distribution" field="holding_lib" />
5288                                 </create>
5289                                 <retrieve/>
5290                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5291                                         <context link="distribution" field="holding_lib" />
5292                                 </update>
5293                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5294                                         <context link="distribution" field="holding_lib" />
5295                                 </delete>
5296                         </actions>
5297                 </permacrud>
5298         </class>
5299
5300         <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">
5301                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5302                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5303                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5304                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5305                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5306                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5307                 </fields>
5308                 <links>
5309                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5310                 </links>
5311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5312                         <actions>
5313                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5314                                         <context link="distribution" field="holding_lib" />
5315                                 </create>
5316                                 <retrieve/>
5317                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5318                                         <context link="distribution" field="holding_lib" />
5319                                 </update>
5320                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5321                                         <context link="distribution" field="holding_lib" />
5322                                 </delete>
5323                         </actions>
5324                 </permacrud>
5325         </class>
5326
5327         <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">
5328                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5329                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5330                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5331                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5332                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5333                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5334                 </fields>
5335                 <links>
5336                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5337                 </links>
5338                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5339                         <actions>
5340                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5341                                         <context link="distribution" field="holding_lib" />
5342                                 </create>
5343                                 <retrieve/>
5344                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5345                                         <context link="distribution" field="holding_lib" />
5346                                 </update>
5347                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5348                                         <context link="distribution" field="holding_lib" />
5349                                 </delete>
5350                         </actions>
5351                 </permacrud>
5352         </class>
5353
5354         <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">
5355                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5356                         <field name="id" reporter:datatype="id" />
5357                         <field name="owning_copy" reporter:datatype="link"/>
5358                         <field name="stat_cat" reporter:datatype="link"/>
5359                         <field name="stat_cat_entry" reporter:datatype="link"/>
5360                 </fields>
5361                 <links>
5362                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5363                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5364                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5365                 </links>
5366                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5367                         <actions>
5368                                 <retrieve/>
5369                         </actions>
5370                 </permacrud>
5371         </class>
5372         <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">
5373                 <fields oils_persist:primary="code">
5374                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5375                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5376                 </fields>
5377                 <links/>
5378         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5379             <actions>
5380                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5381                 <retrieve/>
5382                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5383                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5384             </actions>
5385         </permacrud>
5386         </class>
5387         <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">
5388                 <fields oils_persist:primary="code">
5389                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5390                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5391                 </fields>
5392                 <links/>
5393         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5394             <actions>
5395                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5396                 <retrieve/>
5397                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5398                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5399             </actions>
5400         </permacrud>
5401         </class>
5402         <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">
5403                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5404                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5405                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5406                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5407                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5408                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5409                 </fields>
5410                 <links>
5411             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5412         </links>
5413         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5414             <actions>
5415                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5416                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5417                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5418                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5419             </actions>
5420         </permacrud>
5421         </class>
5422         <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">
5423                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5424                         <field name="id" reporter:datatype="id" />
5425                         <field name="name" reporter:datatype="text"/>
5426                 </fields>
5427                 <links/>
5428         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5429             <actions>
5430                 <create permission="CREATE_LASSO" global_required="true"/>
5431                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5432                 <update permission="UPDATE_LASSO" global_required="true"/>
5433                 <delete permission="DELETE_LASSO" global_required="true"/>
5434             </actions>
5435         </permacrud>
5436         </class>
5437         <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">
5438                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5439                         <field name="id" reporter:datatype="id" />
5440                         <field name="lasso" reporter:datatype="link"/>
5441                         <field name="org_unit" reporter:datatype="org_unit"/>
5442                 </fields>
5443                 <links>
5444                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5445                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5446                 </links>
5447         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5448             <actions>
5449                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5450                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5451                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5452                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5453             </actions>
5454         </permacrud>
5455         </class>
5456         <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">
5457                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5458                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5459                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5460                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5461                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5462                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5463                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5464                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5465                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5466                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5467                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5468                 </fields>
5469                 <links>
5470                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5471                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5472                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5473                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5474                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5475                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5476                 </links>
5477         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5478             <actions>
5479                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5480                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5481                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5482                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5483             </actions>
5484         </permacrud>
5485         </class>
5486         <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">
5487                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5488                         <field name="id" reporter:datatype="id" />
5489                         <field name="from_org" reporter:datatype="org_unit"/>
5490                         <field name="to_org" reporter:datatype="org_unit"/>
5491                         <field name="prox" reporter:datatype="int" />
5492                 </fields>
5493                 <links>
5494                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5495                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5496                 </links>
5497         </class>
5498         <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">
5499                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5500                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5501                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5502                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5503                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5504                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5505                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5506                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5507                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5508                 </fields>
5509                 <links/>
5510         </class>
5511         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5512                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5513                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5514                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5515                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5516                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5517                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5518                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5519                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5520                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5521                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5522                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5523                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5524                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5525                 </fields>
5526                 <links>
5527                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5528                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5529                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5530                 </links>
5531         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5532             <actions>
5533                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5534                 <retrieve/>
5535                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5536                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5537             </actions>
5538         </permacrud>
5539         </class>
5540         <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">
5541                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5542                         <field name="address_type"  reporter:datatype="text"/>
5543                         <field name="city"  reporter:datatype="text"/>
5544                         <field name="country"  reporter:datatype="text"/>
5545                         <field name="county"  reporter:datatype="text"/>
5546                         <field name="id" reporter:datatype="id" />
5547                         <field name="org_unit" reporter:datatype="org_unit"/>
5548                         <field name="post_code"  reporter:datatype="text"/>
5549                         <field name="state"  reporter:datatype="text"/>
5550                         <field name="street1"  reporter:datatype="text"/>
5551                         <field name="street2"  reporter:datatype="text"/>
5552                         <field name="valid" reporter:datatype="bool"/>
5553                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5554                 </fields>
5555                 <links>
5556                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5557                 </links>
5558         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5559             <actions>
5560                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5561                 <retrieve/>
5562                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5563                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5564             </actions>
5565         </permacrud>
5566         </class>
5567         <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">
5568                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5569                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5570                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5571                         <field name="query_text" reporter:datatype="text"/>
5572                 </fields>
5573         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5574             <actions>
5575                 <retrieve/>
5576             </actions>
5577         </permacrud>
5578         </class>
5579
5580         <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">
5581                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5582                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5583                         <field name="owner" reporter:datatype="org_unit"/>
5584                         <field name="code" reporter:datatype="text"/>
5585                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5586                         <field name="create_date" reporter:datatype="timestamp"/>
5587                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5588                 </fields>
5589                 <links>
5590                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5591                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5592                 </links>
5593         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5594             <actions>
5595                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5596                 <retrieve/>
5597                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5598                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5599             </actions>
5600         </permacrud>
5601         </class>
5602         <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">
5603                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5604                         <field name="id" reporter:datatype="id"/>
5605                         <field name="grp" reporter:datatype="link"/>
5606                         <field name="pos" reporter:datatype="int"/>
5607                         <field name="query" reporter:datatype="link"/>
5608                 </fields>
5609                 <links>
5610                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5611                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5612                 </links>
5613         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5614             <actions>
5615                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5616                     <context link="grp" field="owner"/>
5617                 </create>
5618                 <retrieve/>
5619                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5620                     <context link="grp" field="owner"/>
5621                 </update>
5622                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5623                     <context link="grp" field="owner"/>
5624                 </delete>
5625             </actions>
5626         </permacrud>
5627         </class>
5628
5629         <!-- A note: Please update alhr and ahopl when updating ahr -->
5630         <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">
5631                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5632                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5633                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5634                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5635                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5636                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5637                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5638                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5639                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5640                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5641                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5642                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5643                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5644                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5645                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5646                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5647                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5648                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5649                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5650                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5651                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5652                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5653                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5654                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5655                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5656                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5657                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5658                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5659                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5660                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5661                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5662                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5663                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5664                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5665                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5666                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5667                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5668                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5669                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5670                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5671                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5672                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5673                 </fields>
5674                 <links>
5675                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5676                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5677                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5678                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5679                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5680                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5681                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5682                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5683                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5684                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5685                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5686                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5687                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5688                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5689                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5690                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5691                 </links>
5692                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5693                         <actions>
5694                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5695                         </actions>
5696                 </permacrud>
5697         </class>
5698         <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">
5699                 <oils_persist:source_definition><![CDATA[
5700                 SELECT
5701                         ahr.*,
5702                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5703                                 copy_location_order_position,
5704                         CASE WHEN au.alias IS NOT NULL THEN
5705                                 au.alias
5706                         ELSE
5707                                 au.first_given_name
5708                         END AS usr_alias_or_first_given_name,
5709                         au.first_given_name AS usr_first_given_name,
5710                         au.second_given_name AS usr_second_given_name,
5711                         au.family_name AS usr_family_name,
5712                         au.prefix AS usr_prefix,
5713                         au.suffix AS usr_suffix,
5714                         au.alias AS usr_alias,
5715                         CASE WHEN au.alias IS NOT NULL THEN
5716                                 au.alias
5717                         ELSE
5718                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5719                                         COALESCE(au.family_name, ''),
5720                                         COALESCE(au.suffix, ''),
5721                                         ', ',
5722                                         COALESCE(au.prefix, ''),
5723                                         COALESCE(au.first_given_name, ''),
5724                                         COALESCE(au.second_given_name, '')
5725                                 ], ' '), E'\\s+,', ',')
5726                         END AS usr_alias_or_display_name,
5727                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5728                                 COALESCE(au.family_name, ''),
5729                                 COALESCE(au.suffix, ''),
5730                                 ', ',
5731                                 COALESCE(au.prefix, ''),
5732                                 COALESCE(au.first_given_name, ''),
5733                                 COALESCE(au.second_given_name, '')
5734                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5735                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5736                                 AS call_number_label,
5737                         siss.label AS issuance_label,
5738                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5739                         ahcm_1.copy_count AS potential_copies
5740                 FROM action.hold_request ahr
5741                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5742                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5743                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5744                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5745                 JOIN actor.usr au ON (au.id = ahr.usr)
5746                 JOIN (
5747                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5748                         FROM asset.copy_location
5749                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5750                 LEFT JOIN actor.usr_standing_penalty ausp 
5751                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5752                 LEFT JOIN config.standing_penalty csp
5753                         ON (
5754                                 csp.id = ausp.standing_penalty AND 
5755                                 csp.block_list LIKE '%CAPTURE%' AND (
5756                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5757                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5758                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5759                                         )
5760                                 )
5761                         )
5762                 JOIN (
5763                         SELECT COUNT(target_copy) AS copy_count, hold
5764                         FROM action.hold_copy_map
5765                         GROUP BY 2
5766                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5767                 LEFT JOIN serial.issuance siss
5768                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5769                 LEFT JOIN asset.copy_location_order acplo
5770                         ON (acp.location = acplo.location AND
5771                                 acp.circ_lib = acplo.org)
5772                 WHERE
5773                         ahr.capture_time IS NULL AND
5774                         ahr.cancel_time IS NULL AND
5775                         csp.id IS NULL AND
5776                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5777                         acp.status IN (0,7)
5778                 ]]></oils_persist:source_definition>
5779                 <fields oils_persist:primary="id">
5780                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5781                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5782                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5783                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5784                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5785                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5786                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5787                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5788                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5789                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5790                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5791                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5792                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5793                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5794                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5795                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5796                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5797                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5798                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5799                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5800                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5801                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5802                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5803                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5804                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5805                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5806                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5807                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5808                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5809                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5810                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5811                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5812                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5813                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5814                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5815                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5816                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5817                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5818                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5819                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5820                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5821                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5822                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5823                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5824                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5825                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5826                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5827                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5828                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5829                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5830                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5831                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5832                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5833                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5834                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5835                 </fields>
5836                 <links>
5837                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5838                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5839                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5840                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5841                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5842                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5843                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5844                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5845                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5846                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5847                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5848                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5849                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5850                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5851                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5852                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5853                 </links>
5854                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5855                         <actions>
5856                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5857                         </actions>
5858                 </permacrud>
5859         </class>
5860         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5861                 <oils_persist:source_definition>
5862                         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)
5863                 </oils_persist:source_definition>
5864                 <fields oils_persist:primary="id">
5865                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5866                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5867                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5868                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5869                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5870                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5871                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5872                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5873                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5874                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5875                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5876                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5877                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5878                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5879                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5880                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5881                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5882                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5883                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5884                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5885                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5886                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5887                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5888                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5889                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5890                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5891                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5892                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5893                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5894                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5895                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5896                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5897                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5898                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5899                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5900                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5901                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5902                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5903                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5904                 </fields>
5905                 <links>
5906                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5907                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5908                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5909                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5910                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5911                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5912                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5913                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5914                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5915                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5916                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5917                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5918                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5919                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5920                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5921                 </links>
5922         </class>
5923
5924         <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">
5925                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5926                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5927                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5928                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5929                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5930                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5931                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5932                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5933                 </fields>
5934                 <links>
5935                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5936                 </links>
5937                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5938                         <actions>
5939                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5940                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5941                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5942                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5943                         </actions>
5944                 </permacrud>
5945         </class>
5946         <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">
5947                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5948                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5949                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5950                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5951                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5952                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5953                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5954                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5955                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5956                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5957                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5958                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5959                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5960                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5961                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5962                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5963                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5964                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5965                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5966                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5967                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5968                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5969                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5970                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5971                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5972                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5973                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5974                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5975                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5976                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5977                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5978                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5979                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5980                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5981                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5982                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5983                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5984                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5985                 </fields>
5986                 <links>
5987                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5988                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5989                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5990                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5991                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5992                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5993                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5994                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5995                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5996                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5997                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5998                 </links>
5999                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6000                         <actions>
6001                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6002                         </actions>
6003                 </permacrud>
6004         </class>
6005         <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">
6006                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6007                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6008                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6009                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
6010                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6011                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6012                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6013                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6014                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6015                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6016                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6017                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6018                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6019                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6020                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6021                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6022                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6023                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6024                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6025                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6026                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6027                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6028                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6029                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6030                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6031                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6032                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6033                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6034                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6035                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6036                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6037                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6038                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6039                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6040                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6041                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6042                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6043                 </fields>
6044                 <links>
6045                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6046                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6047                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6048                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6049                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6050                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6051                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6052                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6053                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6054                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6055                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6056                 </links>
6057                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6058                         <actions>
6059                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6060                         </actions>
6061                 </permacrud>
6062         </class>
6063
6064         <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">
6065                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6066                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6067                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6068                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6069                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6070                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6071                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6072                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6073                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6074                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6075                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6076                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6077                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6078                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6079                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6080                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6081                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6082                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6083                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6084                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6085                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6086                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6087                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6088                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6089                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6090                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6091                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6092                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6093                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6094                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6095                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6096                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6097                 </fields>
6098                 <links>
6099                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6100                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6101                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6102                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6103                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6104                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6105                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6106                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6107                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6108                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6109                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6110                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6111                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6112                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6113                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6114                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6115                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6116                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6117                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6118                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6119                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6120                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6121                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6122                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6123                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6124                 </links>
6125         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6126             <actions>
6127                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6128                 <retrieve />
6129                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6130                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6131             </actions>
6132         </permacrud>
6133         </class>
6134         <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">
6135                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6136                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6137                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6138                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6139                 </fields>
6140                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6141                         <actions>
6142                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6143                                 <retrieve/>
6144                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6145                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6146                         </actions>
6147                 </permacrud>
6148         </class>
6149         <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">
6150                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6151                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6152                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6153                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6154                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6155                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6156                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6157                 </fields>
6158                 <links>
6159                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6160                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6161                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6162                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6163                 </links>
6164                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6165                         <actions>
6166                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6167                                 <retrieve/>
6168                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6169                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6170                         </actions>
6171                 </permacrud>
6172         </class>
6173         <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">
6174                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6175                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6176                         <field name="btype" reporter:datatype="text"/>
6177                         <field name="id" reporter:datatype="id" />
6178                         <field name="name"  reporter:datatype="text"/>
6179                         <field name="description" reporter:datatype="text"/>
6180                         <field name="owner" reporter:datatype="link"/>
6181                         <field name="pub" reporter:datatype="bool"/>
6182                         <field name="create_time" reporter:datatype="timestamp" />
6183                 </fields>
6184                 <links>
6185                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6186                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6187                 </links>
6188         </class>
6189         <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">
6190                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6191                         <field name="id" reporter:datatype="id" />
6192                         <field name="bucket" reporter:datatype="link"/>
6193                         <field name="note" reporter:datatype="text" />
6194                 </fields>
6195                 <links>
6196                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6197                 </links>
6198         </class>
6199         <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">
6200                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6201                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6202                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6203                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6204                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6205                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6206                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6207                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6208                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6209                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6210                 </fields>
6211                 <links>
6212                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6213                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6214                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6215                 </links>
6216                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6217                         <actions>
6218                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6219                         </actions>
6220                 </permacrud>
6221         </class>
6222         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6223                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6224                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6225                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6226                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6227                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6228                 </fields>
6229                 <links>
6230                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6231                 </links>
6232                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6233                         <actions>
6234                                 <retrieve permission="VIEW_USER">
6235                                         <context link="usr" field="home_ou" />
6236                                 </retrieve>
6237                         </actions>
6238                 </permacrud>
6239         </class>
6240     <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">
6241         <fields oils_persist:primary="field">
6242             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6243             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6244             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6245         </fields>
6246         <links/>
6247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6248             <actions>
6249                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6250                 <retrieve />
6251                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6252                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6253             </actions>
6254         </permacrud>
6255     </class>
6256         <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">
6257                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6258                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6259                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6260                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6261                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6262                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6263                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6264                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6265                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6266                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6267                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6268                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6269                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6270                 </fields>
6271                 <links>
6272                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6273                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6274                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6275                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6276                 </links>
6277         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6278             <actions>
6279                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6280                 <retrieve />
6281                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6282                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6283             </actions>
6284         </permacrud>
6285         </class>
6286         <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">
6287                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6288                         <field name="field" reporter:datatype="link"/>
6289                         <field name="id" reporter:datatype="id" />
6290                         <field name="source" reporter:datatype="link"/>
6291                         <field name="value"  reporter:datatype="text"/>
6292                 </fields>
6293                 <links>
6294                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6295                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6296                 </links>
6297         </class>
6298         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6299                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6300                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6301                         <field name="btype" reporter:datatype="text"/>
6302                         <field name="id" reporter:datatype="id" />
6303                         <field name="name"  reporter:datatype="text"/>
6304                         <field name="description" reporter:datatype="text"/>
6305                         <field name="owner" reporter:datatype="link"/>
6306                         <field name="pub" reporter:datatype="bool"/>
6307                         <field name="create_time" reporter:datatype="timestamp" />
6308                 </fields>
6309                 <links>
6310                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6311                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6312                 </links>
6313         </class>
6314         <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">
6315                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6316                         <field name="id" reporter:datatype="id" />
6317                         <field name="bucket" reporter:datatype="link"/>
6318                         <field name="note" reporter:datatype="text" />
6319                 </fields>
6320                 <links>
6321                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6322                 </links>
6323         </class>
6324         <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">
6325                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6326                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6327                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6328                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6329                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6330                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6331                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6332                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6333                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6334                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6335                 </fields>
6336                 <links>
6337                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6338                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6339                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6340                 </links>
6341         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6342             <actions>
6343                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6344                     <context link="xact" jump="usr" field="home_ou"/>
6345                 </retrieve>
6346                         </actions>
6347                 </permacrud>
6348         </class>
6349         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6350                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6351                         <field name="id" reporter:datatype="id" />
6352                         <field name="ind1" />
6353                         <field name="ind2" />
6354                         <field name="record" />
6355                         <field name="subfield" />
6356                         <field name="tag" />
6357                         <field name="value" />
6358                 </fields>
6359                 <links>
6360                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6361                 </links>
6362         </class>
6363         <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">
6364                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6365                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6366                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6367                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6368                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6369                 </fields>
6370                 <links>
6371                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6372                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6373                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6374                 </links>
6375         </class>
6376         <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">
6377                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6378                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6379                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6380                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6381                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6382                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6383                 </fields>
6384                 <links>
6385                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6386                 </links>
6387         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6388             <actions>
6389                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6390                 <retrieve/>
6391                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6392                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6393             </actions>
6394         </permacrud>
6395
6396         </class>
6397         <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">
6398                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6399                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6400                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6401                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6402                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6403                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6404                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6405                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6406                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6407                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6408                 </fields>
6409                 <links>
6410                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6411                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6412                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6413                 </links>
6414         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6415             <actions>
6416                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6417                 <retrieve/>
6418                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6419                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6420             </actions>
6421         </permacrud>
6422         </class>
6423         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6424                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6425                         <field name="create_date" reporter:datatype="timestamp"/>
6426                         <field name="creator" reporter:datatype="link"/>
6427                         <field name="edit_date" reporter:datatype="timestamp"/>
6428                         <field name="editor" reporter:datatype="link"/>
6429                         <field name="id" reporter:datatype="id" />
6430                         <field name="pub" reporter:datatype="bool"/>
6431                         <field name="record" reporter:datatype="link"/>
6432                         <field name="value"  reporter:datatype="text"/>
6433                 </fields>
6434                 <links>
6435                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6436                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6437                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6438                 </links>
6439         </class>
6440         <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">
6441                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6442                         <field name="balance_owed" reporter:datatype="money" />
6443                         <field name="total_owed" reporter:datatype="money" />
6444                         <field name="total_paid" reporter:datatype="money" />
6445                         <field name="usr" reporter:datatype="link"/>
6446                 </fields>
6447                 <links>
6448                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6449                 </links>
6450         </class>
6451         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6452                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6453                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6454                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6455                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6456                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6457                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6458                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6459                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6460                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6461                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6462                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6463                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6464                 </fields>
6465                 <links>
6466                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6467                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6468                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6469                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6470                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6471                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6472                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6473                 </links>
6474         </class>
6475         <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">
6476                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6477                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6478                         <field name="quality" reporter:datatype="int" />
6479                         <field name="source" reporter:datatype="text"/>
6480                         <field name="transcendant" reporter:datatype="bool"/>
6481                         <field name="can_have_copies" reporter:datatype="bool"/>
6482                 </fields>
6483                 <links/>
6484         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6485             <actions>
6486                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6487                 <retrieve/>
6488                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6489                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6490             </actions>
6491         </permacrud>
6492         </class>
6493         <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">
6494                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6495                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6496                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6497                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6498                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6499                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6500                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6501                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6502                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6503                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6504                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6505                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6506                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6507                 </fields>
6508                 <links>
6509                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6510                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6511                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6512                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6513                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6514                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6515                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6516                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6517                 </links>
6518                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6519                         <actions>
6520                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6521                                         <context link="usr" field="home_ou" />
6522                                 </retrieve>
6523                         </actions>
6524                 </permacrud>
6525         </class>
6526         <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">
6527                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6528                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6529                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6530                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6531                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6532                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6533                 </fields>
6534                 <links>
6535                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6536                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6537                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6538                 </links>
6539         </class>
6540         <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">
6541                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6542                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6543                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6544                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6545                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6546                 </fields>
6547                 <links>
6548                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6549                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6550                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6551                 </links>
6552         </class>
6553         <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">
6554                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6555                         <field name="bucket" reporter:datatype="link"/>
6556                         <field name="id" reporter:datatype="id" />
6557                         <field name="target_user" reporter:datatype="link"/>
6558                         <field name="create_time" reporter:datatype="timestamp" />
6559                         <field name="pos" reporter:datatype="int" />
6560                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6561                 </fields>
6562                 <links>
6563                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6564                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6565             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6566                 </links>
6567         </class>
6568         <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">
6569                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6570                         <field name="id" reporter:datatype="id" />
6571                         <field name="item" reporter:datatype="link"/>
6572                         <field name="note" reporter:datatype="text" />
6573                 </fields>
6574                 <links>
6575                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6576                 </links>
6577         </class>
6578         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6579                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6580                         <field name="balance_owed" reporter:datatype="money" />
6581                         <field name="total_owed" reporter:datatype="money" />
6582                         <field name="total_paid" reporter:datatype="money" />
6583                         <field name="usr" reporter:datatype="link"/>
6584                 </fields>
6585                 <links>
6586                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6587                 </links>
6588         </class>
6589         <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">
6590                 <fields oils_persist:primary="code" oils_persist:sequence="">
6591                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6592                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6593                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6594                 </fields>
6595                 <links/>
6596         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6597             <actions>
6598                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6599                 <retrieve/>
6600                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6601                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6602             </actions>
6603         </permacrud>
6604         </class>
6605         <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">
6606                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6607                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6608                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6609                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6610                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6611                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6612                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6613                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6614                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6615                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6616                 </fields>
6617                 <links>
6618                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6619                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6620                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6621                 </links>
6622         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6623             <actions>
6624                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6625                     <context link="xact" jump="usr" field="home_ou"/>
6626                 </retrieve>
6627                         </actions>
6628                 </permacrud>
6629         </class>
6630         <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">
6631                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6632                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6633                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6634                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6635                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6636                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6637                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6638                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6639                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6640                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6641                 </fields>
6642                 <links>
6643                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6644                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6645                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6646                 </links>
6647         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6648             <actions>
6649                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6650                     <context link="xact" jump="usr" field="home_ou"/>
6651                 </retrieve>
6652                         </actions>
6653                 </permacrud>
6654         </class>
6655         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6656                 <fields oils_persist:primary="id" oils_persist:sequence="">
6657                         <field name="checkin_lib" reporter:datatype="link"/>
6658                         <field name="checkin_staff" reporter:datatype="link"/>
6659                         <field name="checkin_time" reporter:datatype="timestamp"/>
6660                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6661                         <field name="circ_staff" reporter:datatype="link"/>
6662                         <field name="desk_renewal" reporter:datatype="bool"/>
6663                         <field name="due_date" reporter:datatype="timestamp"/>
6664                         <field name="duration" reporter:datatype="interval"/>
6665                         <field name="duration_rule" reporter:datatype="link"/>
6666                         <field name="fine_interval" reporter:datatype="interval"/>
6667                         <field name="id" reporter:datatype="id" />
6668                         <field name="max_fine" reporter:datatype="money" />
6669                         <field name="max_fine_rule" reporter:datatype="link"/>
6670                         <field name="opac_renewal" reporter:datatype="bool"/>
6671                         <field name="phone_renewal" reporter:datatype="bool"/>
6672                         <field name="recurring_fine" reporter:datatype="money" />
6673                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6674                         <field name="renewal_remaining" reporter:datatype="int" />
6675             <field name="grace_period" reporter:datatype="interval" />
6676                         <field name="stop_fines" reporter:datatype="text"/>
6677                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6678                         <field name="target_copy" reporter:datatype="link"/>
6679                         <field name="usr" reporter:datatype="link"/>
6680                         <field name="xact_finish" reporter:datatype="timestamp" />
6681                         <field name="xact_start" reporter:datatype="timestamp" />
6682                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6683                 </fields>
6684                 <links>
6685                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6686                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6687                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6688                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6689                 </links>
6690         </class>
6691         <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">
6692                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6693                         <field name="field" reporter:datatype="link"/>
6694                         <field name="id" reporter:datatype="id" />
6695                         <field name="source" reporter:datatype="link"/>
6696                         <field name="value" reporter:datatype="text"/>
6697                 </fields>
6698                 <links>
6699                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6700                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6701                 </links>
6702         </class>
6703         <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">
6704                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6705                         <field name="high" reporter:datatype="money" />
6706                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6707                         <field name="low" reporter:datatype="money" />
6708                         <field name="name" reporter:datatype="text"/>
6709                         <field name="normal" reporter:datatype="money" />
6710                         <field name="recurrence_interval" reporter:datatype="interval"/>
6711             <field name="grace_period" reporter:datatype="interval" />
6712                 </fields>
6713                 <links/>
6714         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6715             <actions>
6716                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6717                 <retrieve/>
6718                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6719                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6720             </actions>
6721         </permacrud>
6722         </class>
6723         <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">
6724                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6725                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6726                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6727                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6728                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6729                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6730                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6731                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6732                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6733                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6734                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6735                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6736                 </fields>
6737                 <links>
6738                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6739                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6740                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6741                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6742                 </links>
6743         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6744             <actions>
6745                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6746                     <context link="xact" jump="usr" field="home_ou"/>
6747                 </retrieve>
6748                         </actions>
6749                 </permacrud>
6750         </class>
6751         <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">
6752                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6753                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6754                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6755                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6756                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6757                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6758                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6759                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6760                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6761                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6762                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6763                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6764                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6765                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6766                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6767                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6768                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6769                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6770                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6771                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6772                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6773                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6774                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6775                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6776                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6777                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6778                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6779                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6780                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6781                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6782                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6783                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6784                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6785                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6786                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6787                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6788                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6789                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6790                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6791                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6792                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6793                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6794                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6795                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6796                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6797                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6798                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6799                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
6800                 </fields>
6801                 <links>
6802                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6803                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6804                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6805                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6806                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6807                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6808                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6809                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6810                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6811                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6812                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6813                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6814                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
6815                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
6816                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6817                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6818                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6819                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6820                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6821                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6822                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6823                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6824                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
6825                 </links>
6826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6827             <actions>
6828                 <create permission="CREATE_COPY">
6829                     <context link="call_number" field="owning_lib"/>
6830                 </create>
6831                 <retrieve/>
6832                 <update permission="UPDATE_COPY">
6833                     <context link="call_number" field="owning_lib"/>
6834                 </update>
6835                 <delete permission="DELETE_COPY">
6836                     <context link="call_number" field="owning_lib"/>
6837                 </delete>
6838             </actions>
6839         </permacrud>
6840         </class>
6841
6842         <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">
6843                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6844                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6845                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6846                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6847                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6848                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6849                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6850                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6851                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6852                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6853                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6854                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6855                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6856                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6857                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6858                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6859                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6860                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6861                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6862                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6863                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6864                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6865                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6866                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6867                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6868                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6869                 </fields>
6870                 <links>
6871                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6872                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6873                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6874                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6875                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6876                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6877                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6878                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6879                 </links>
6880                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6881                         <actions>
6882                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6883                                 <retrieve />
6884                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6885                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6886                         </actions>
6887                 </permacrud>
6888         </class>
6889
6890         <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">
6891                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6892                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6893                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6894                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6895                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6896                 </fields>
6897                 <links/>
6898         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6899             <actions>
6900                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6901                 <retrieve/>
6902                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6903                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6904             </actions>
6905         </permacrud>
6906         </class>
6907         <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">
6908                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6909                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6910                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6911                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6912                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6913                 </fields>
6914                 <links/>
6915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6916             <actions>
6917                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6918                 <retrieve/>
6919                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6920                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6921             </actions>
6922         </permacrud>
6923         </class>
6924         <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">
6925                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6926                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6927                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6928                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6929                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6930                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6931                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6932                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6933                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6934                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6935                 </fields>
6936                 <links>
6937                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6938                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6939                 </links>
6940         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6941             <actions>
6942                 <create permission="CREATE_PERM" global_required="true"/>
6943                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6944                 <update permission="UPDATE_PERM" global_required="true"/>
6945                 <delete permission="DELETE_PERM" global_required="true"/>
6946             </actions>
6947         </permacrud>
6948         </class>
6949         <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">
6950                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6951                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6952                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6953                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6954                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6955                 </fields>
6956                 <links>
6957                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6958                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6959                 </links>
6960         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6961             <actions>
6962                 <create permission="ADMIN_SURVEY">
6963                     <context link="question" jump="survey" field="owner"/>
6964                 </create>
6965                 <retrieve/>
6966                 <update permission="ADMIN_SURVEY">
6967                     <context link="question" jump="survey" field="owner"/>
6968                 </update>
6969                 <delete permission="ADMIN_SURVEY">
6970                     <context link="question" jump="survey" field="owner"/>
6971                 </delete>
6972             </actions>
6973         </permacrud>
6974         </class>
6975         <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">
6976                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6977                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6978                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6979                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6980                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6981                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6982                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6983                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6984                 </fields>
6985                 <links>
6986                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6987                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6988                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6989                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6990                 </links>
6991                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6992                         <actions>
6993                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
6994                         </actions>
6995                 </permacrud>
6996         </class>
6997         <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">
6998                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6999                         <field name="balance_owed" reporter:datatype="money" />
7000                         <field name="total_owed" reporter:datatype="money" />
7001                         <field name="total_paid" reporter:datatype="money" />
7002                         <field name="usr" reporter:datatype="link"/>
7003                 </fields>
7004                 <links>
7005                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7006                 </links>
7007         </class>
7008         <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">
7009                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7010                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7011                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7012                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7013                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7014                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7015                 </fields>
7016                 <links>
7017                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7018                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7019                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7020                 </links>
7021         </class>
7022         <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">
7023                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7024                         <field name="field" reporter:datatype="link"/>
7025                         <field name="id" reporter:datatype="id" />
7026                         <field name="source" reporter:datatype="link"/>
7027                         <field name="value" reporter:datatype="text"/>
7028                 </fields>
7029                 <links>
7030                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7031                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7032                 </links>
7033         </class>
7034         <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">
7035                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7036                         <field name="field" reporter:datatype="link"/>
7037                         <field name="id" reporter:datatype="id" />
7038                         <field name="source" reporter:datatype="link"/>
7039                         <field name="value" reporter:datatype="text"/>
7040                 </fields>
7041                 <links>
7042                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7043                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7044                 </links>
7045         </class>
7046         <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">
7047                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7048                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7049                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7050                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7051                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7052                 </fields>
7053                 <links>
7054                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7055                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7056                 </links>
7057         </class>
7058         <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">
7059                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7060                         <field name="depth" reporter:datatype="int" />
7061                         <field name="grantable" reporter:datatype="bool"/>
7062                         <field name="grp" reporter:datatype="link"/>
7063                         <field name="id" reporter:datatype="id" />
7064                         <field name="perm" reporter:datatype="link"/>
7065                 </fields>
7066                 <links>
7067                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7068                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7069                 </links>
7070         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7071             <actions>
7072                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7073                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7074                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7075                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7076             </actions>
7077         </permacrud>
7078         </class>
7079         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
7080                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7081                         <field name="items" oils_persist:virtual="true" />
7082                         <field name="btype" reporter:datatype="text"/>
7083                         <field name="id" reporter:datatype="id" />
7084                         <field name="name" reporter:datatype="text"/>
7085                         <field name="description" reporter:datatype="text"/>
7086                         <field name="owner" reporter:datatype="link"/>
7087                         <field name="pub" reporter:datatype="bool"/>
7088                         <field name="create_time" reporter:datatype="timestamp" />
7089                 </fields>
7090                 <links>
7091                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7092                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7093                 </links>
7094         </class>
7095         <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">
7096                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7097                         <field name="id" reporter:datatype="id" />
7098                         <field name="bucket" reporter:datatype="link"/>
7099                         <field name="note" reporter:datatype="text" />
7100                 </fields>
7101                 <links>
7102                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7103                 </links>
7104         </class>
7105         <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">
7106                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7107                         <field name="id" reporter:datatype="int" />
7108                         <field name="usr" reporter:datatype="link"/>
7109                         <field name="work_ou" reporter:datatype="link"/>
7110                 </fields>
7111                 <links>
7112                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7113                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7114                 </links>
7115         </class>
7116         <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">
7117                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7118                         <field name="depth" reporter:datatype="int"/>
7119                         <field name="grantable" reporter:datatype="bool"/>
7120                         <field name="id" reporter:datatype="id" />
7121                         <field name="perm" reporter:datatype="link"/>
7122                         <field name="usr" reporter:datatype="link"/>
7123                 </fields>
7124                 <links>
7125                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7126                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7127                 </links>
7128         </class>
7129         <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">
7130                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7131                         <field name="object_id" reporter:datatype="text"/>
7132                         <field name="grantable" reporter:datatype="bool"/>
7133                         <field name="id" reporter:datatype="id" />
7134                         <field name="perm" reporter:datatype="link"/>
7135                         <field name="usr" reporter:datatype="link"/>
7136                         <field name="object_type" reporter:datatype="text"/>
7137                 </fields>
7138                 <links>
7139                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7140                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7141                 </links>
7142         </class>
7143         <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">
7144                 <fields oils_persist:primary="id" oils_persist:sequence="">
7145                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7146                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7147                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7148                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7149                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7150                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7151                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7152                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7153                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7154                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7155                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7156                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7157                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7158                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7159                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7160                 </fields>
7161                 <links>
7162                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7163                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7164                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7165                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7166                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7167                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7168                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7169                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7170                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7171                 </links>
7172         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7173             <actions>
7174                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7175                     <context link="xact" jump="usr" field="home_ou"/>
7176                 </retrieve>
7177                         </actions>
7178                 </permacrud>
7179         </class>
7180         <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">
7181                 <fields oils_persist:primary="id" oils_persist:sequence="">
7182                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7183                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7184                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7185                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7186                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7187                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7188                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7189                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7190                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7191                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7192                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7193                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7194                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7195                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7196                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7197                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7198                 </fields>
7199                 <links>
7200                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7201                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7202                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7203                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7204                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7205                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7206                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7207                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7208                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7209                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7210                 </links>
7211         </class>
7212         <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">
7213                 <fields oils_persist:primary="id" oils_persist:sequence="">
7214                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7215                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7216                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7217                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7218                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7219                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7220                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7221                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7222                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7223                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7224                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7225                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7226                 </fields>
7227                 <links>
7228                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7229                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7230                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7231                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7232                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7233                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7234                 </links>
7235         </class>
7236         <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">
7237                 <fields oils_persist:primary="id" oils_persist:sequence="">
7238                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7239                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7240                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7241                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7242                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7243                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7244                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7245                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7246                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7247                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7248                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7249                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7250                 </fields>
7251                 <links>
7252                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7253                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7254                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7255                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7256                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7257                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7258                 </links>
7259         </class>
7260         <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">
7261                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7262                         <field name="bucket" reporter:datatype="link"/>
7263                         <field name="id" reporter:datatype="id" />
7264                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7265                         <field name="create_time" reporter:datatype="timestamp" />
7266                         <field name="pos" reporter:datatype="int" />
7267                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7268                 </fields>
7269                 <links>
7270                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7271                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7272             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7273                 </links>
7274         </class>
7275         <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">
7276                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7277                         <field name="id" reporter:datatype="id" />
7278                         <field name="item" reporter:datatype="link"/>
7279                         <field name="note" reporter:datatype="text" />
7280                 </fields>
7281                 <links>
7282                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7283                 </links>
7284         </class>
7285         <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">
7286                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7287                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7288                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7289                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7290                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7291                 </fields>
7292                 <links>
7293                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7294                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7295                 </links>
7296                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7297                         <actions>
7298                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7299                         </actions>
7300                 </permacrud>
7301         </class>
7302     <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">
7303         <fields oils_persist:primary="field">
7304             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7305             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7306             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7307         </fields>
7308         <links/>
7309         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7310             <actions>
7311                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7312                 <retrieve />
7313                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7314                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7315             </actions>
7316         </permacrud>
7317     </class>
7318         <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">
7319                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7320                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7321                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7322                 </fields>
7323                 <links/>
7324         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7325             <actions>
7326                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7327                 <retrieve/>
7328                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7329                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7330             </actions>
7331         </permacrud>
7332         </class>
7333
7334
7335         <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">
7336                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7337                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7338                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7339                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7340                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7341                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7342                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7343                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7344                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7345                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7346                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7347                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7348                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7349                 </fields>
7350                 <links>
7351                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7352                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7353                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7354                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7355                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7356                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7357                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7358                 </links>
7359         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7360             <actions>
7361                 <create permission="TRANSIT_COPY">
7362                     <context link="target_copy" field="owner"/>
7363                 </create>
7364                 <retrieve/>
7365                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7366                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7367             </actions>
7368         </permacrud>
7369         </class>
7370         <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">
7371                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7372                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7373                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7374                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7375                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7376                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7377                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7378                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7379                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7380                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7381                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7382                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7383                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7384                 </fields>
7385                 <links>
7386                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7387                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7388                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7389                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7390                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7391                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7392                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7393                 </links>
7394         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7395             <actions>
7396                 <create permission="TRANSIT_COPY" context_field="owner">
7397                     <context link="target_copy" field="circ_lib"/>
7398                 </create>
7399                 <retrieve/>
7400                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7401                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7402             </actions>
7403         </permacrud>
7404         </class>
7405         <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">
7406                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7407                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7408                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7409                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7410                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7411                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7412                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7413                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7414                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7415                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7416                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7417                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
7418                 </fields>
7419                 <links>
7420                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7421                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7422                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7423                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
7424                 </links>
7425         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7426             <actions>
7427                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7428                     <context link="xact" jump="usr" field="home_ou"/>
7429                 </retrieve>
7430                         </actions>
7431                 </permacrud>
7432         </class>
7433         <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">
7434                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7435                         <field name="grp" />
7436                         <field name="id" reporter:datatype="id" />
7437                         <field name="usr" />
7438                 </fields>
7439                 <links>
7440                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7441                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7442                 </links>
7443         </class>
7444         <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">
7445                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7446                         <field name="id" reporter:datatype="id" />
7447                         <field name="fq_field" reporter:datatype="text"/>
7448                         <field name="identity_value" reporter:datatype="text"/>
7449                         <field name="translation" reporter:datatype="text"/>
7450                         <field name="string" reporter:datatype="text"/>
7451                 </fields>
7452                 <links>
7453                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7454                 </links>
7455         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7456             <actions>
7457                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7458                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7459                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7460                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7461             </actions>
7462         </permacrud>
7463         </class>
7464         <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">
7465                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7466                         <field name="id" reporter:datatype="id" />
7467                         <field name="fm_class" reporter:datatype="text"/>
7468                         <field name="field" reporter:datatype="text"/>
7469                         <field name="owner" reporter:datatype="org_unit"/>
7470                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7471                 </fields>
7472                 <links>
7473                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7474                 </links>
7475         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7476             <actions>
7477                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7478                 <retrieve/>
7479                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7480                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7481             </actions>
7482         </permacrud>
7483         </class>
7484         <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">
7485                 <fields oils_persist:primary="code">
7486                         <field name="code" reporter:datatype="id" />
7487                         <field name="marc_code" reporter:datatype="text"/>
7488                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7489                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7490                 </fields>
7491                 <links/>
7492         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7493             <actions>
7494                 <create permission="CREATE_LOCALE" global_required="true"/>
7495                 <retrieve/>
7496                 <update permission="UPDATE_LOCALE" global_required="true"/>
7497                 <delete permission="DELETE_LOCALE" global_required="true"/>
7498             </actions>
7499         </permacrud>
7500         </class>
7501         <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">
7502                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7503                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7504                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7505                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7506             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7507                 </fields>
7508                 <links>
7509                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7510                 </links>
7511         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7512             <actions>
7513                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7514                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7515                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7516                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7517             </actions>
7518         </permacrud>
7519         </class>
7520
7521         <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">
7522                 <fields oils_persist:primary="id">
7523                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7524                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7525                 </fields>
7526                 <links/>
7527         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7528             <actions>
7529                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7530                 <retrieve/>
7531                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7532                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7533             </actions>
7534         </permacrud>
7535         </class>
7536
7537         <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">
7538                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7539                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7540                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7541                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7542                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7543                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7544                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7545                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7546                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7547                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7548                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7549                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7550                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7551                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7552                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7553                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7554                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7555                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7556                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7557                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7558                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7559                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7560                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7561                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7562                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7563                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7564                 </fields>
7565                 <links>
7566                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7567                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7568                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7569                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7570                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7571                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7572                 </links>
7573         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7574             <actions>
7575                 <create permission="user_request.create">
7576                     <context link="usr" field="home_ou"/>
7577                                 </create>
7578                 <retrieve permission="user_request.view">
7579                     <context link="usr" field="home_ou"/>
7580                                 </retrieve>
7581                 <update permission="user_request.update">
7582                     <context link="usr" field="home_ou"/>
7583                                 </update>
7584                 <delete permission="user_request.delete">
7585                     <context link="usr" field="home_ou"/>
7586                                 </delete>
7587             </actions>
7588         </permacrud>
7589         </class>
7590
7591         <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">
7592                 <fields oils_persist:primary="code">
7593                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7594                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7595                 </fields>
7596                 <links/>
7597         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7598             <actions>
7599                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7600                 <retrieve/>
7601                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7602                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7603             </actions>
7604         </permacrud>
7605         </class>
7606
7607         <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">
7608                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7609                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7610                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7611                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7612                         <field reporter:label="Ratio" name="ratio" />
7613                 </fields>
7614                 <links>
7615                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7616                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7617                 </links>
7618                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7619                         <actions>
7620                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7621                                 <retrieve/>
7622                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7623                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7624                         </actions>
7625                 </permacrud>
7626         </class>
7627
7628         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7629                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7630                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7631                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7632                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7633                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7634                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7635                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7636                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7637                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7638                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7639                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7640                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7641                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7642                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7643                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7644                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7645                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7646                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7647                 </fields>
7648                 <links>
7649                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7650                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7651             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7652             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7653             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7654                 </links>
7655         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7656             <actions>
7657                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7658                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7659                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7660                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7661             </actions>
7662         </permacrud>
7663         </class>
7664
7665         <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">
7666                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7667                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7668                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7669                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7670                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7671                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7672                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7673                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7674                 </fields>
7675                 <links>
7676                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7677                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7678                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7679                 </links>
7680         </class>
7681
7682         <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">
7683                 <fields oils_persist:primary="code">
7684                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7685                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7686                 </fields>
7687                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7688             <actions>
7689                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7690                 <retrieve/>
7691                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7692                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7693             </actions>
7694                 </permacrud>
7695         </class>
7696
7697         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7698                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7699                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7700                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7701                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7702                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7703                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7704                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7705                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7706                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7707                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7708                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7709                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7710                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7711                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7712                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7713                 </fields>
7714                 <links>
7715                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7716                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7717                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7718                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7719                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7720                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7721                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7722                 </links>
7723         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7724             <actions>
7725                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7726                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7727                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7728                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7729             </actions>
7730         </permacrud>
7731         </class>
7732
7733         <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">
7734                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7735                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7736                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7737                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7738                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7739                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7740                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7741                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7742                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7743                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7744                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7745                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7746                 </fields>
7747                 <links>
7748                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7749                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7750                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7751                 </links>
7752         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7753             <actions>
7754                 <create   permission="ADMIN_INVOICE">
7755                                         <context link="invoice" field="receiver"/>
7756                                 </create>
7757                 <retrieve permission="ADMIN_INVOICE">
7758                                         <context link="invoice" field="receiver"/>
7759                                 </retrieve>
7760                 <update   permission="ADMIN_INVOICE">
7761                                         <context link="invoice" field="receiver"/>
7762                                 </update>
7763                                 <delete   permission="ADMIN_INVOICE">
7764                                         <context link="invoice" field="receiver"/>
7765                                 </delete>
7766             </actions>
7767         </permacrud>
7768         </class>
7769
7770         <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">
7771                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7772                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7773                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7774                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7775                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7776                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7777                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7778                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7779                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7780                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7781                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7782                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7783                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7784                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7785                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7786                 </fields>
7787                 <links>
7788                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7789                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7790                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7791                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7792                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7793                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7794                 </links>
7795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7796             <actions>
7797                 <create   permission="ADMIN_INVOICE">
7798                                         <context link="invoice" field="receiver"/>
7799                                 </create>
7800                 <retrieve permission="ADMIN_INVOICE">
7801                                         <context link="invoice" field="receiver"/>
7802                                 </retrieve>
7803                 <update   permission="ADMIN_INVOICE">
7804                                         <context link="invoice" field="receiver"/>
7805                                 </update>
7806                                 <delete   permission="ADMIN_INVOICE">
7807                                         <context link="invoice" field="receiver"/>
7808                                 </delete>
7809             </actions>
7810         </permacrud>
7811         </class>
7812
7813         <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">
7814                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7815                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7816                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7817                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7818                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7819                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7820                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7821                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7822                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7823                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7824                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7825                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7826                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7827                 </fields>
7828                 <links>
7829                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7830                 </links>
7831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7832             <actions>
7833                 <create permission="ADMIN_PROVIDER">
7834                     <context link="provider" field="owner"/>
7835                 </create>
7836                 <retrieve permission="ADMIN_PROVIDER">
7837                     <context link="provider" field="owner"/>
7838                 </retrieve>
7839                 <update permission="ADMIN_PROVIDER">
7840                     <context link="provider" field="owner"/>
7841                 </update>
7842                 <delete permission="ADMIN_PROVIDER">
7843                     <context link="provider" field="owner"/>
7844                 </delete>
7845             </actions>
7846         </permacrud>
7847         </class>
7848
7849         <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">
7850                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7851                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7852                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7853                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7854                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7855                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7856                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7857         </fields>
7858                 <links>
7859                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7860                 </links>
7861         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7862             <actions>
7863                 <create permission="ADMIN_PROVIDER">
7864                     <context link="provider" field="owner"/>
7865                 </create>
7866                 <retrieve permission="ADMIN_PROVIDER">
7867                     <context link="provider" field="owner"/>
7868                 </retrieve>
7869                 <update permission="ADMIN_PROVIDER">
7870                     <context link="provider" field="owner"/>
7871                 </update>
7872                 <delete permission="ADMIN_PROVIDER">
7873                     <context link="provider" field="owner"/>
7874                 </delete>
7875             </actions>
7876         </permacrud>
7877     </class>
7878         <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">
7879                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7880                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7881                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7882                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7883                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7884                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7885                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7886                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7887                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7888                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7889                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7890                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7891                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7892                 </fields>
7893                 <links>
7894                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7895                 </links>
7896         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7897             <actions>
7898                 <create permission="ADMIN_PROVIDER">
7899                     <context link="contact" jump='provider' field="owner"/>
7900                 </create>
7901                 <retrieve permission="ADMIN_PROVIDER">
7902                     <context link="contact" jump='provider' field="owner"/>
7903                 </retrieve>
7904                 <update permission="ADMIN_PROVIDER">
7905                     <context link="contact" jump='provider' field="owner"/>
7906                 </update>
7907                 <delete permission="ADMIN_PROVIDER">
7908                     <context link="contact" jump='provider' field="owner"/>
7909                 </delete>
7910             </actions>
7911         </permacrud>
7912         </class>
7913
7914         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7915                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7916                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7917                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7918                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7919                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7920                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7921                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7922                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7923                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7924                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7925                 </fields>
7926                 <links>
7927                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7928                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7929                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7930                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7931                 </links>
7932         </class>
7933
7934         <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">
7935                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7936                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7937                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7938                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7939                 </fields>
7940                 <links>
7941             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7942                 </links>
7943                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7944                         <actions>
7945                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7946                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7947                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7948                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7949                         </actions>
7950                 </permacrud>
7951         </class>
7952
7953         <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">
7954                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7955                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7956                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7957                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7958                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7959                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7960                 </fields>
7961                 <links>
7962                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7963                 </links>
7964                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7965                         <actions>
7966                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7967                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7968                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7969                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7970                         </actions>
7971                 </permacrud>
7972         </class>
7973
7974         <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">
7975                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7976                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7977                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7978                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7979                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7980                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7981                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7982                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7983                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7984                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7985                 </fields>
7986                 <links>
7987                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7988                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7989             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7990             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7991                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7992                 </links>
7993         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7994             <actions>
7995                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7996                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7997                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7998                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7999             </actions>
8000         </permacrud>
8001         </class>
8002
8003         <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">
8004                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8005                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8006                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8007                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8008                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8009                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8010                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8011                 </fields>
8012                 <links>
8013                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8014                 </links>
8015                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8016                         <actions>
8017                                 <create permission="ADMIN_FUNDING_SOURCE">
8018                     <context link="funding_source" field="owner"/>
8019                 </create>
8020                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8021                     <context link="funding_source" field="owner"/>
8022                 </retrieve>
8023                                 <update permission="ADMIN_FUNDING_SOURCE">
8024                     <context link="funding_source" field="owner"/>
8025                 </update>
8026                                 <delete permission="ADMIN_FUNDING_SOURCE">
8027                     <context link="funding_source" field="owner"/>
8028                 </delete>
8029                         </actions>
8030                 </permacrud>
8031         </class>
8032
8033         <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">
8034                 <fields oils_persist:primary="id">
8035                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8036                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8037                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8038                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8039                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8040                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8041                 </fields>
8042                 <links>
8043                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8044                 </links>
8045         </class>
8046
8047         <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">
8048                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8049                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8050                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8051                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8052                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8053                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8054                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
8055                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
8056                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8057                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
8058                 </fields>
8059                 <links>
8060                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8061                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8062                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
8063                 </links>
8064                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8065                         <actions>
8066                                 <create permission="ADMIN_ACQ_FUND">
8067                     <context link="fund" field="org"/>
8068                 </create>
8069                                 <retrieve permission="ADMIN_ACQ_FUND">
8070                     <context link="fund" field="org"/>
8071                 </retrieve>
8072                                 <update permission="ADMIN_ACQ_FUND">
8073                     <context link="fund" field="org"/>
8074                 </update>
8075                                 <delete permission="ADMIN_ACQ_FUND">
8076                     <context link="fund" field="org"/>
8077                 </delete>
8078                         </actions>
8079                 </permacrud>
8080         </class>
8081
8082         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
8083                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8084                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8085                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8086                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8087                         <field reporter:label="Year" name="year" reporter:datatype="int" />
8088                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8089                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8090                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8091                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8092                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8093                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8094                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8095                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8096                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8097                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8098                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8099                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8100                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8101                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8102                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8103                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8104                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8105                 </fields>
8106                 <links>
8107                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8108                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8109             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8110             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8111             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8112             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8113             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8114             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8115             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8116             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8117             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8118                 </links>
8119         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8120             <actions>
8121                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8122                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8123                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8124                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8125             </actions>
8126         </permacrud>
8127         </class>
8128
8129         <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">
8130                 <fields oils_persist:primary="fund">
8131                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8132                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8133                 </fields>
8134                 <links>
8135                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8136                 </links>
8137         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8138             <actions>
8139                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8140                                         <context link="fund" field="org" />
8141                 </retrieve>
8142             </actions>
8143         </permacrud>
8144         </class>
8145
8146         <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">
8147                 <fields oils_persist:primary="fund">
8148                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8149                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8150                 </fields>
8151                 <links>
8152                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8153                 </links>
8154         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8155             <actions>
8156                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8157                                         <context link="fund" field="org" />
8158                 </retrieve>
8159             </actions>
8160         </permacrud>
8161         </class>
8162
8163         <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">
8164                 <fields oils_persist:primary="fund">
8165                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8166                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8167                 </fields>
8168                 <links>
8169                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8170                 </links>
8171         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8172             <actions>
8173                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8174                                         <context link="fund" field="org" />
8175                 </retrieve>
8176             </actions>
8177         </permacrud>
8178         </class>
8179
8180         <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">
8181                 <fields oils_persist:primary="fund">
8182                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8183                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8184                 </fields>
8185                 <links>
8186                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8187                 </links>
8188         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8189             <actions>
8190                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8191                                         <context link="fund" field="org" />
8192                 </retrieve>
8193             </actions>
8194         </permacrud>
8195         </class>
8196
8197         <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">
8198                 <fields oils_persist:primary="fund">
8199                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8200                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8201                 </fields>
8202                 <links>
8203                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8204                 </links>
8205         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8206             <actions>
8207                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8208                                         <context link="fund" field="org" />
8209                 </retrieve>
8210             </actions>
8211         </permacrud>
8212         </class>
8213
8214    <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">
8215         <fields oils_persist:primary="fund">
8216             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8217             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8218         </fields>
8219         <links>
8220             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8221         </links>
8222     </class>
8223
8224    <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">
8225         <fields oils_persist:primary="fund">
8226             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8227             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8228         </fields>
8229         <links>
8230             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8231         </links>
8232     </class>
8233
8234    <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">
8235         <fields oils_persist:primary="fund">
8236             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8237             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8238         </fields>
8239         <links>
8240             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8241         </links>
8242     </class>
8243
8244    <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">
8245         <fields oils_persist:primary="fund">
8246             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8247             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8248         </fields>
8249         <links>
8250             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8251         </links>
8252     </class>
8253
8254    <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">
8255         <fields oils_persist:primary="fund">
8256             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8257             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8258         </fields>
8259         <links>
8260             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8261         </links>
8262     </class>
8263
8264         <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">
8265                 <fields oils_persist:primary="funding_source">
8266                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8267                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8268                 </fields>
8269                 <links>
8270                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8271                 </links>
8272         </class>
8273
8274         <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">
8275                 <fields oils_persist:primary="funding_source">
8276                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8277                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8278                 </fields>
8279                 <links>
8280                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8281                 </links>
8282         </class>
8283
8284         <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">
8285                 <fields oils_persist:primary="funding_source">
8286                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8287                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8288                 </fields>
8289                 <links>
8290                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8291                 </links>
8292         </class>
8293
8294         <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">
8295                 <fields oils_persist:primary="fund">
8296                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8297                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8298                 </fields>
8299                 <links>
8300                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8301                 </links>
8302         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8303             <actions>
8304                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8305                                         <context link="fund" field="org" />
8306                 </retrieve>
8307             </actions>
8308         </permacrud>
8309     </class>
8310     <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">
8311         <oils_persist:source_definition><![CDATA[
8312             SELECT
8313                 acqf.*,
8314                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8315                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8316                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8317                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8318             FROM
8319                 acq.fund acqf
8320                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8321                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8322                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8323                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8324         ]]></oils_persist:source_definition>
8325         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8326             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8327             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8328             <field reporter:label="Name" name="name" reporter:datatype="text" />
8329             <field reporter:label="Year" name="year" reporter:datatype="int" />
8330             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8331             <field reporter:label="Code" name="code" reporter:datatype="text" />
8332             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8333             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8334             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8335             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8336             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8337
8338             <!-- non fund-native fields -->
8339             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8340             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8341             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8342             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8343         </fields>
8344         <links>
8345             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8346             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8347             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8348         </links>
8349         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8350             <actions>
8351                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8352             </actions>
8353         </permacrud>
8354         </class>
8355         <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">
8356                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8357                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8358                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8359                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8360                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8361                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8362                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8363                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8364                 </fields>
8365                 <links>
8366                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8367                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8368                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8369                 </links>
8370                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8371                         <actions>
8372                                 <create permission="ADMIN_ACQ_FUND">
8373                     <context link="fund" field="org"/>
8374                 </create>
8375                                 <retrieve permission="ADMIN_ACQ_FUND">
8376                     <context link="fund" field="org"/>
8377                 </retrieve>
8378                                 <update permission="ADMIN_ACQ_FUND">
8379                     <context link="fund" field="org"/>
8380                 </update>
8381                                 <delete permission="ADMIN_ACQ_FUND">
8382                     <context link="fund" field="org"/>
8383                 </delete>
8384                         </actions>
8385                 </permacrud>
8386         </class>
8387
8388     <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">
8389         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8390             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8391             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8392             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8393             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8394             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8395             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8396             <field reporter:label="Note" name="note" reporter:datatype="text" />
8397             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8398         </fields>
8399         <links>
8400             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8401             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8402             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8403         </links>
8404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8405                         <actions>
8406                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8407                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8408                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8409                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8410                         </actions>
8411                 </permacrud>
8412     </class>
8413
8414         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8415                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8416                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8417                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8418                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8419                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8420                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8421                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8422                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8423                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8424                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8425                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8426                 </fields>
8427                 <links>
8428                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8429                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8430                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8431                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8432                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8433                 </links>
8434                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8435                         <actions>
8436                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8437                         </actions>
8438                 </permacrud>
8439         </class>
8440
8441         <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">
8442                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8443                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8444                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8445                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8446                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8447                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8448                 </fields>
8449                 <links>
8450                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8451                 </links>
8452                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8453                         <actions>
8454                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8455                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8456                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8457                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8458                         </actions>
8459                 </permacrud>
8460         </class>
8461
8462         <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">
8463                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8464                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8465                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8466                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8467                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8468                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8469                         <field reporter:label="State" name="state" reporter:datatype="text" />
8470                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8471                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8472                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8473                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8474                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8475                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8476                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8477                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8478                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8479                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8480                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8481                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8482                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8483                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8484                 </fields>
8485                 <links>
8486                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8487                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8488                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8489                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8490                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8491                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8492                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8493                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8494                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8495                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8496                 </links>
8497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8498                         <actions>
8499                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8500                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8501                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8502                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8503                         </actions>
8504                 </permacrud>
8505         </class>
8506
8507         <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">
8508                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8509                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8510                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8511                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8512                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8513                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8514                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8515                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8516                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8517                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8518                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8519                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8520                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8521                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8522                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8523                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8524                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8525                 </fields>
8526                 <links>
8527                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8528                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8529                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8530                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8531                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8532                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8533                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8534                 </links>
8535                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8536             <actions>
8537                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8538             </actions>
8539                 </permacrud>
8540         </class>
8541
8542         <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">
8543                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8544                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8545                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8546                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8547                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8548                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8549                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8550                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8551                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8552                 </fields>
8553                 <links>
8554                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8555                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8556                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8557                 </links>
8558                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8559             <actions>
8560                 <create permission="CREATE_PURCHASE_ORDER">
8561                     <context link="purchase_order" field="ordering_agency"/>
8562                 </create>
8563                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8564                     <context link="purchase_order" field="ordering_agency"/>
8565                 </retrieve>
8566                 <update permission="CREATE_PURCHASE_ORDER">
8567                     <context link="purchase_order" field="ordering_agency"/>
8568                 </update>
8569                 <delete permission="CREATE_PURCHASE_ORDER">
8570                     <context link="purchase_order" field="ordering_agency"/>
8571                 </delete>
8572             </actions>
8573                 </permacrud>
8574         </class>
8575
8576         <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">
8577                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8578                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8579                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8580                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8581                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8582                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8583                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8584                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8585                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8586                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8587                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8588                 </fields>
8589                 <links>
8590                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8591                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8592                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8593                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8594                 </links>
8595                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8596             <actions>
8597                 <create permission="CREATE_PURCHASE_ORDER">
8598                     <context link="purchase_order" field="ordering_agency"/>
8599                 </create>
8600                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8601                     <context link="purchase_order" field="ordering_agency"/>
8602                 </retrieve>
8603                 <update permission="CREATE_PURCHASE_ORDER">
8604                     <context link="purchase_order" field="ordering_agency"/>
8605                 </update>
8606                 <delete permission="CREATE_PURCHASE_ORDER">
8607                     <context link="purchase_order" field="ordering_agency"/>
8608                 </delete>
8609             </actions>
8610                 </permacrud>
8611         </class>
8612
8613         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8614                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8615                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8616                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8617                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8618                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8619                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8620                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8621                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8622                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8623                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8624                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8625                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8626                         <field reporter:label="State" name="state" reporter:datatype="text" />
8627                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8628                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8629                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8630                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8631                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8632                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8633                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8634                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8635                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8636                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8637                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8638                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8639                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8640                 </fields>
8641                 <links>
8642                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8643                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8644                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8645                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8646                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8647                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8648                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8649                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8650                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8651                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8652                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8653                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8654                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8655                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8656                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8657                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8658                 </links>
8659                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8660                         <actions>
8661                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8662                                         <context link="purchase_order" field="ordering_agency"/>
8663                                         <context link="picklist" field="org_unit"/>
8664                                 </retrieve>
8665                         </actions>
8666                 </permacrud>
8667         </class>
8668
8669         <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">
8670                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8671                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8672                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8673                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8674                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8675                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8676                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8677                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8678                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8679                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8680                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8681                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8682                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8683                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8684                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8685                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8686                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8687                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8688                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8689                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8690                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8691                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8692                 </fields>
8693                 <links>
8694                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8695                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8696                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8697                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8698                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8699                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8700                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8701                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8702                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8703                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8704                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8705                 </links>
8706                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8707                         <actions>
8708                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8709                                         <context link="purchase_order" field="ordering_agency"/>
8710                                         <context link="picklist" field="org_unit"/>
8711                                 </retrieve>
8712                         </actions>
8713                 </permacrud>
8714         </class>
8715
8716         <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">
8717                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8718                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8719                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8720                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8721                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8722                 </fields>
8723                 <links>
8724                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8725                 </links>
8726                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8727                         <actions>
8728                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8729                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8730                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8731                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8732                         </actions>
8733                 </permacrud>
8734         </class>
8735
8736         <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">
8737                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8738                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8739                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8740                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8741                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8742                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8743                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8744                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8745                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8746                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8747                 </fields>
8748                 <links>
8749                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8750                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8751                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8752                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8753                 </links>
8754         </class>
8755
8756         <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">
8757                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8758                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8759                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8760                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8761                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8762                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8763                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8764                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8765                 </fields>
8766                 <links>
8767                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8768                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8769                 </links>
8770         </class>
8771
8772         <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">
8773                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8774                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8775                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8776                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8777                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8778                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8779                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8780                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8781                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8782                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8783                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8784                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8785                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8786                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8787                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8788                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8789                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8790                 </fields>
8791                 <links>
8792                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8793                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8794                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8795                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8796                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8797                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8798                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8799                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8800                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8801                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8802                 </links>
8803         </class>
8804
8805         <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">
8806                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8807                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8808                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8809                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8810                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8811                 </fields>
8812                 <links/>
8813                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8814                         <actions>
8815                                 <retrieve />
8816                         </actions>
8817                 </permacrud>
8818         </class>
8819
8820         <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">
8821                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8822                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8823                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8824                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8825                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8826                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8827             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8828                 </fields>
8829                 <links/>
8830         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8831             <actions>
8832                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8833                 <retrieve />
8834                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8835                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8836             </actions>
8837         </permacrud>
8838         </class>
8839
8840         <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">
8841                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8842                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8843                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8844                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8845                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8846                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8847                 </fields>
8848                 <links/>
8849         </class>
8850         <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">
8851                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8852                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8853                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8854                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8855                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8856                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8857                 </fields>
8858                 <links>
8859                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8860                 </links>
8861         </class>
8862
8863         <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">
8864             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8865                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8866                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8867                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8868                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8869                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8870                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8871         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8872
8873             </fields>
8874             <links>
8875                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8876             </links>
8877             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8878                 <actions>
8879                     <create permission="ADMIN_PROVIDER">
8880                         <context link="provider" field="owner"/>
8881                     </create>
8882                     <retrieve permission="ADMIN_PROVIDER">
8883                         <context link="provider" field="owner"/>
8884                     </retrieve>
8885                     <update permission="ADMIN_PROVIDER">
8886                         <context link="provider" field="owner"/>
8887                     </update>
8888                     <delete permission="ADMIN_PROVIDER">
8889                         <context link="provider" field="owner"/>
8890                     </delete>
8891                 </actions>
8892             </permacrud>
8893         </class>
8894         
8895         <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">
8896             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8897                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8898                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8899                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8900                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8901             </fields>
8902             <links>
8903                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8904             </links>
8905             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8906                 <actions>
8907                     <create permission="ADMIN_PROVIDER">
8908                         <context link="provider" field="owner"/>
8909                     </create>
8910                     <retrieve permission="ADMIN_PROVIDER">
8911                         <context link="provider" field="owner"/>
8912                     </retrieve>
8913                     <update permission="ADMIN_PROVIDER">
8914                         <context link="provider" field="owner"/>
8915                     </update>
8916                     <delete permission="ADMIN_PROVIDER">
8917                         <context link="provider" field="owner"/>
8918                     </delete>
8919                 </actions>
8920             </permacrud>
8921         </class>
8922         
8923         <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">
8924             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8925                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8926                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8927                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8928                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8929                 </fields>
8930                 <links/>
8931         </class>
8932
8933         <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">
8934                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8935                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8936                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8937                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8938                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8939                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8940                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8941                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8942                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8943                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8944                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8945                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8946                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8947                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8948                 </fields>
8949                 <links>
8950                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8951                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8952                 </links>
8953         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8954             <actions>
8955                 <create permission="ADMIN_PROVIDER">
8956                     <context link="provider" field="owner"/>
8957                 </create>
8958                 <retrieve permission="ADMIN_PROVIDER">
8959                     <context link="provider" field="owner"/>
8960                 </retrieve>
8961                 <update permission="ADMIN_PROVIDER">
8962                     <context link="provider" field="owner"/>
8963                 </update>
8964                 <delete permission="ADMIN_PROVIDER">
8965                     <context link="provider" field="owner"/>
8966                 </delete>
8967             </actions>
8968         </permacrud>
8969         </class>
8970
8971         <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">
8972                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8973                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8974                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8975                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8976                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8977                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8978                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8979                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8980                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8981                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8982                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8983                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8984                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8985                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8986                 </fields>
8987                 <links>
8988                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8989                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8990                 </links>
8991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8992             <actions>
8993                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8994                     <context link="account" jump="provider" field="owner"/>
8995                 </retrieve>
8996                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8997                     <context link="account" jump="provider" field="owner"/>
8998                 </update>
8999                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9000                     <context link="account" jump="provider" field="owner"/>
9001                 </delete>
9002             </actions>
9003         </permacrud>
9004         </class>
9005
9006
9007         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
9008                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
9009                         <field name="id" reporter:datatype="id" />
9010                         <field name="parent" reporter:datatype="link"/>
9011                         <field name="owner" reporter:datatype="link"/>
9012                         <field name="create_time" reporter:datatype="timestamp"/>
9013                         <field name="name" reporter:datatype="text"/>
9014                         <field name="shared" reporter:datatype="bool"/>
9015                         <field name="share_with" reporter:datatype="link"/>
9016                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9017                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
9018                 </fields>
9019                 <links>
9020                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9021                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
9022                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
9023                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9024                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
9025                 </links>
9026         </class>
9027         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
9028                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
9029                         <field name="id" reporter:datatype="id" />
9030                         <field name="parent" reporter:datatype="link"/>
9031                         <field name="owner" reporter:datatype="link"/>
9032                         <field name="create_time" reporter:datatype="timestamp"/>
9033                         <field name="name" reporter:datatype="text"/>
9034                         <field name="shared" reporter:datatype="bool"/>
9035                         <field name="share_with" reporter:datatype="link"/>
9036                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9037                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
9038                 </fields>
9039                 <links>
9040                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9041                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
9042                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
9043                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9044                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
9045                 </links>
9046         </class>
9047         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
9048                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
9049                         <field name="id" reporter:datatype="id" />
9050                         <field name="parent" reporter:datatype="link"/>
9051                         <field name="owner" reporter:datatype="link"/>
9052                         <field name="create_time" reporter:datatype="timestamp"/>
9053                         <field name="name" reporter:datatype="text"/>
9054                         <field name="shared" reporter:datatype="bool"/>
9055                         <field name="share_with" reporter:datatype="link"/>
9056                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9057                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9058                 </fields>
9059                 <links>
9060                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9061                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
9062                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
9063                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9064                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
9065                 </links>
9066         </class>
9067         <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">
9068                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
9069                         <field name="id" reporter:datatype="id" />
9070                         <field name="owner" reporter:datatype="link"/>
9071                         <field name="create_time" reporter:datatype="timestamp"/>
9072                         <field name="name" reporter:datatype="text"/>
9073                         <field name="data" reporter:datatype="text"/>
9074                         <field name="folder" reporter:datatype="link"/>
9075                         <field name="description" reporter:datatype="text"/>
9076                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9077                 </fields>
9078                 <links>
9079                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9080                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
9081                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
9082                 </links>
9083         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9084             <actions>
9085                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9086                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9087                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9088                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9089             </actions>
9090         </permacrud>
9091         </class>
9092         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
9093                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
9094                         <field name="id" reporter:datatype="id" />
9095                         <field name="owner" reporter:datatype="link"/>
9096                         <field name="create_time" reporter:datatype="timestamp"/>
9097                         <field name="template" reporter:datatype="link"/>
9098                         <field name="data" reporter:datatype="text"/>
9099                         <field name="folder" reporter:datatype="link"/>
9100                         <field name="recur" reporter:datatype="bool"/>
9101                         <field name="recurrence" reporter:datatype="interval"/>
9102                         <field name="name" reporter:datatype="text"/>
9103                         <field name="description" reporter:datatype="text"/>
9104                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9105                 </fields>
9106                 <links>
9107                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9108                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
9109                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
9110                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
9111                 </links>
9112         </class>
9113         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
9114                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
9115                         <field name="id" reporter:datatype="id" />
9116                         <field name="runner" reporter:datatype="link"/>
9117                         <field name="start_time" reporter:datatype="timestamp"/>
9118                         <field name="complete_time" reporter:datatype="timestamp"/>
9119                         <field name="run_time" reporter:datatype="timestamp"/>
9120                         <field name="email" reporter:datatype="text"/>
9121                         <field name="excel_format" reporter:datatype="bool"/>
9122                         <field name="csv_format" reporter:datatype="bool"/>
9123                         <field name="html_format" reporter:datatype="bool"/>
9124                         <field name="error_code" reporter:datatype="int"/>
9125                         <field name="error_text" reporter:datatype="text"/>
9126                         <field name="report" reporter:datatype="link"/>
9127                         <field name="folder" reporter:datatype="link"/>
9128                         <field name="chart_pie" reporter:datatype="bool"/>
9129                         <field name="chart_bar" reporter:datatype="bool"/>
9130                         <field name="chart_line" reporter:datatype="bool"/>
9131                 </fields>
9132                 <links>
9133                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9134                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9135                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9136                 </links>
9137         </class>
9138         <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">
9139                 <fields oils_persist:primary="id">
9140                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9141                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9142                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9143                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9144                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9145                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9146                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9147                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9148                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9149                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9150                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9151                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9152                 </fields>
9153                 <links>
9154                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9155                 </links>
9156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9157                         <actions>
9158                                 <retrieve />
9159                         </actions>
9160                 </permacrud>
9161         </class>
9162         <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">
9163                 <fields oils_persist:primary="id">
9164                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9165                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9166                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9167                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9168                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9169                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9170                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9171                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9172                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9173                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9174                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9175                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9176                 </fields>
9177                 <links>
9178                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9179                 </links>
9180         </class>
9181         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9182                 <fields oils_persist:primary="id">
9183                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9184                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9185                         <field reporter:label="Fingerprint" name="fingerprint" />
9186                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9187                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9188                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9189                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9190                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9191                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9192                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9193                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9194                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9195                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9196                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9197                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9198                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9199                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9200                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9201                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9202                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9203                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9204                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9205                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9206                 </fields>
9207                 <links>
9208                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9209                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9210                 </links>
9211         </class>
9212         <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">
9213                 <fields oils_persist:primary="id">
9214                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9215                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9216                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9217                 </fields>
9218                 <links>
9219                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9220                 </links>
9221         </class>
9222         <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">
9223                 <fields oils_persist:primary="id">
9224                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9225                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9226                 </fields>
9227                 <links>
9228                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9229                 </links>
9230         </class>
9231         <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">
9232                 <fields oils_persist:primary="id">
9233                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9234                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9235                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9236                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9237                 </fields>
9238                 <links>
9239                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9240                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9241                 </links>
9242         </class>
9243         <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">
9244                 <fields oils_persist:primary="xact">
9245                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9246                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9247                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9248                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9249                 </fields>
9250                 <links>
9251                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9252                 </links>
9253         </class>
9254         <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">
9255                 <fields oils_persist:primary="xact">
9256                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9257                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9258                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9259                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9260                 </fields>
9261                 <links>
9262                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9263                 </links>
9264         </class>
9265         <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)">
9266                 <fields oils_persist:primary="id">
9267                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9268                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9269                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9270                 </fields>
9271                 <links>
9272                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9273                 </links>
9274         </class>
9275         <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">
9276                 <fields oils_persist:primary="id">
9277                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9278                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9279                 </fields>
9280                 <links>
9281                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9282                 </links>
9283         </class>
9284         <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">
9285                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9286                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9287                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9288                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9289                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9290                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9291                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9292                 </fields>
9293                 <links>
9294                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9295                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9296                 </links>
9297                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9298                         <actions>
9299                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9300                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9301                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9302                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9303                         </actions>
9304                 </permacrud>
9305         </class>
9306         <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">
9307                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9308                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9309                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9310                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9311                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9312                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9313                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9314                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9315                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9316                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9317                 </fields>
9318                 <links>
9319                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9320                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9321                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9322                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9323                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9324                 </links>
9325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9326                         <actions>
9327                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9328                                         <context link="formula" field="owner"/>
9329                                 </create>
9330                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9331                                         <context link="formula" field="owner"/>
9332                                 </retrieve>
9333                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9334                                         <context link="formula" field="owner"/>
9335                                 </update>
9336                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9337                                         <context link="formula" field="owner"/>
9338                                 </delete>
9339                         </actions>
9340                 </permacrud>
9341         </class>
9342
9343         <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">
9344                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9345                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9346                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9347                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9348                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9349                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9350                 </fields>
9351                 <links>
9352                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9353                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9354                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9355                 </links>
9356                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9357                         <actions>
9358                                 <create permission="CREATE_PURCHASE_ORDER">
9359                                         <context link="formula" field="owner"/>
9360                 </create>
9361                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9362                                         <context link="formula" field="owner"/>
9363                 </retrieve>
9364                                 <update permission="CREATE_PURCHASE_ORDER">
9365                                         <context link="formula" field="owner"/>
9366                 </update>
9367                                 <delete permission="CREATE_PURCHASE_ORDER">
9368                                         <context link="formula" field="owner"/>
9369                 </delete>
9370                         </actions>
9371                 </permacrud>
9372         </class>
9373
9374         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9375                 <fields oils_persist:primary="id">
9376                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9377                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9378                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9379                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9380                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9381                 </fields>
9382                 <links>
9383                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9384                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9385                 </links>
9386         </class>
9387
9388         <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">
9389                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9390                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9391                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9392                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9393                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9394                 </fields>
9395                 <links>
9396                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9397                 </links>
9398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9399                         <actions>
9400                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9401                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9402                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9403                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9404                         </actions>
9405                 </permacrud>
9406         </class>
9407
9408         <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">
9409                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9410                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9411                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9412                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9413                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9414                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9415                 </fields>
9416                 <links>
9417                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9418                 </links>
9419                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9420                         <actions>
9421                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9422                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9423                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9424                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9425                         </actions>
9426                 </permacrud>
9427         </class>
9428
9429         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9430                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9431                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9432                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9433                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9434                 </fields>
9435                 <links>
9436                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9437                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9438                 </links>
9439         </class>
9440
9441         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9442                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9443                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9444                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9445                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9446                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9447                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9448                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9449                 </fields>
9450                 <links>
9451                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9452                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9453                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9454                 </links>
9455         </class>
9456
9457         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9458                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9459                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9460                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9461                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9462                 </fields>
9463                 <links>
9464                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9465                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9466                 </links>
9467         </class>
9468
9469         <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">
9470                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9471                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9472                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9473                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9474                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9475                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9476                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9477                 </fields>
9478                 <links>
9479                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9480                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9481                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9482                 </links>
9483         </class>
9484
9485         <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">
9486                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9487                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9488                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9489                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9490                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9491                 </fields>
9492                 <links>
9493                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9494                 </links>
9495                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9496             <actions>
9497                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9498                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9499                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9500                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9501             </actions>
9502                 </permacrud>
9503         </class>
9504
9505         <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">
9506                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9507                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9508                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9509                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9510                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9511                 </fields>
9512                 <links>
9513                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9514                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9515                 </links>
9516                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9517                         <actions>
9518                                 <create permission="ADMIN_CLAIM_POLICY">
9519                                         <context link="claim_policy" field="org_unit"/>
9520                 </create>
9521                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9522                                         <context link="claim_policy" field="org_unit"/>
9523                 </retrieve>
9524                                 <update permission="ADMIN_CLAIM_POLICY">
9525                                         <context link="claim_policy" field="org_unit"/>
9526                 </update>
9527                                 <delete permission="ADMIN_CLAIM_POLICY">
9528                                         <context link="claim_policy" field="org_unit"/>
9529                 </delete>
9530                         </actions>
9531                 </permacrud>
9532         </class>
9533
9534     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9535         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9536             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9537             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9538             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9539             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9540             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9541             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9542             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9543             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9544             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9545             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9546             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9547             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9548             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9549             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9550             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9551             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9552         </fields>
9553         <links>
9554             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9555         </links>
9556     </class>
9557
9558     <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">
9559         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9560             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9561             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9562             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9563             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9564             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9565         </fields>
9566     </class>
9567
9568     <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">
9569         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9570             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9571             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9572             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9573             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9574             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9575             <field reporter:label="City" name="city" reporter:datatype="text"/>
9576             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9577             <field reporter:label="State" name="state" reporter:datatype="text"/>
9578             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9579             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9580             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9581         </fields>
9582     </class>
9583
9584     <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">
9585         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9586             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9587             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9588             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9589             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9590             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9591             <field reporter:label="City" name="city" reporter:datatype="text"/>
9592             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9593             <field reporter:label="State" name="state" reporter:datatype="text"/>
9594             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9595             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9596             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9597         </fields>
9598     </class>
9599
9600     <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">
9601         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9602             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9603             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9604             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9605             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9606             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9607             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9608         </fields>
9609     </class>
9610
9611         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9612                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9613                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9614                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9615                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9616                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9617                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9618                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9619                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9620                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9621                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9622                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9623                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9624                 </fields>
9625                 <links>
9626                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9627                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9628                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9629                 </links>
9630         </class>
9631
9632         <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">
9633                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9634                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9635                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9636                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9637                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9638                 </fields>
9639                 <links>
9640                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9641                 </links>
9642         </class>
9643
9644     <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">
9645         <fields>
9646             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9647             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9648             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9649         </fields>
9650                 <links>
9651                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9652                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9653                 </links>
9654     </class>
9655
9656     <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">
9657         <fields>
9658             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9659             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9660         </fields>
9661                 <links>
9662                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9663                 </links>
9664     </class>
9665
9666     <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">
9667         <fields>
9668             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9669             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9670             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9671         </fields>
9672                 <links>
9673                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9674                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9675                 </links>
9676     </class>
9677
9678     <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">
9679         <fields>
9680             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9681             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9682         </fields>
9683                 <links>
9684                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9685                 </links>
9686     </class>
9687
9688     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9689                 <oils_persist:source_definition>
9690
9691             SELECT  DISTINCT l.*
9692               FROM  action.unfulfilled_hold_loops l
9693                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9694               WHERE l.count = m.max
9695
9696                 </oils_persist:source_definition>
9697         <fields>
9698             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9699             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9700             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9701         </fields>
9702                 <links>
9703                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9704                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9705                 </links>
9706     </class>
9707
9708         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9709                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9710                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9711                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9712                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9713                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9714                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9715                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9716                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9717                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9718                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9719                 </fields>
9720                 <links>
9721                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9722                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9723                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9724                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9725                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9726                 </links>
9727         </class>
9728
9729         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9730                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9731                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9732                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9733                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9734                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9735                 </fields>
9736                 <links>
9737                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9738                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9739                 </links>
9740         </class>
9741
9742         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9743                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9744                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9745                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9746                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9747                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9748                 </fields>
9749                 <links>
9750                 </links>
9751         </class>
9752
9753         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9754                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9755                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9756                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9757                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9758                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9759                 </fields>
9760                 <links>
9761                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9762                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9763                 </links>
9764         </class>
9765         
9766         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9767                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9768                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9769                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9770                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9771                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9772                 </fields>
9773                 <links>
9774                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9775                 </links>
9776         </class>
9777         
9778         <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">
9779                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9780                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9781                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9782                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9783                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9784                 </fields>
9785                 <links>
9786                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9787                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9788                 </links>
9789         </class>
9790
9791         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9792                 <fields oils_persist:primary="name">
9793                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9794                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9795                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9796                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9797                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9798                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9799                 </fields>
9800                 <links>
9801                 </links>
9802         </class>
9803
9804         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9805                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9806                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9807                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9808                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9809                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9810                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9811                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9812                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9813                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9814                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9815                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9816                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9817                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9818                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9819                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9820                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9821                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9822                 </fields>
9823                 <links>
9824                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9825                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9826                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9827                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9828                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9829                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9830                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9831                 </links>
9832         </class>
9833
9834         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9835                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9836                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9837                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9838                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9839                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9840                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9841                 </fields>
9842                 <links>
9843                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9844                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9845                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9846                 </links>
9847         </class>
9848
9849         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9850                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9851                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9852                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9853                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9854                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9855                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9856                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9857                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9858                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9859                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9860                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9861                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9862                 </fields>
9863                 <links>
9864                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9865                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9866                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9867                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9868                 </links>
9869         </class>
9870
9871         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9872                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9873                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9874                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9875                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9876                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9877                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9878                 </fields>
9879                 <links>
9880                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9881                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9882                 </links>
9883         </class>
9884
9885         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9886                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9887                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9888                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9889                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9890                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9891                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9892                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9893                 </fields>
9894                 <links>
9895                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9896                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9897                 </links>
9898         </class>
9899
9900         <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">
9901                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9902                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9903                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9904                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9905                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9906                 </fields>
9907                 <links>
9908                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9909                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9910                 </links>
9911         </class>
9912
9913         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9914                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9915                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9916                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9917                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9918                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9919                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9920                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9921                 </fields>
9922                 <links>
9923                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9924                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9925                 </links>
9926         </class>
9927
9928         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9929                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9930                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9931                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9932                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9933                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9934                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9935                 </fields>
9936                 <links>
9937                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9938                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9939                 </links>
9940         </class>
9941
9942         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9943                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9944                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9945                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9946                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9947                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9948                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9949                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9950                 </fields>
9951                 <links>
9952                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9953                 </links>
9954         </class>
9955
9956         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9957                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9958                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9959                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9960                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9961                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9962                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9963                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9964                 </fields>
9965                 <links>
9966                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9967                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9968                 </links>
9969         </class>
9970
9971         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9972                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9973                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9974                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9975                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9976                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9977                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9978                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9979                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9980                 </fields>
9981                 <links>
9982                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9983                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9984                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9985                 </links>
9986         </class>
9987
9988         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9989                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9990                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9991                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9992                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9993                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9994                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9995                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9996                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9997                 </fields>
9998                 <links>
9999                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10000                 </links>
10001         </class>
10002
10003         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
10004                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10005                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10006                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10007                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10008                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10009                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10010                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10011                 </fields>
10012                 <links>
10013                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10014                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10015                 </links>
10016         </class>
10017
10018         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
10019                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10020                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10021                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10022                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10023                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10024                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10025                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10026                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10027                 </fields>
10028                 <links>
10029                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10030                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10031                 </links>
10032         </class>
10033
10034         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
10035                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10036                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10037                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10038                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10039                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10040                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10041                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10042                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10043                 </fields>
10044                 <links>
10045                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10046                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10047                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10048                 </links>
10049         </class>
10050
10051         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
10052                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10053                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10054                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10055                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10056                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10057                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10058                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10059                 </fields>
10060                 <links>
10061                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10062                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10063                 </links>
10064         </class>
10065
10066         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
10067                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10068                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10069                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10070                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10071                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10072                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10073                 </fields>
10074                 <links>
10075                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10076                 </links>
10077         </class>
10078
10079         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
10080                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10081                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10082                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10083                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10084                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10085                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10086                 </fields>
10087                 <links>
10088                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10089                 </links>
10090         </class>
10091
10092         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
10093                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10094                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10095                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10096                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10097                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10098                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10099                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10100                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10101                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10102                 </fields>
10103                 <links>
10104                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10105                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10106                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10107                 </links>
10108         </class>
10109
10110         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
10111                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10112                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10113                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10114                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10115                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10116                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10117                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10118                 </fields>
10119                 <links>
10120                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10121                 </links>
10122         </class>
10123
10124         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
10125                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10126                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10127                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10128                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10129                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10130                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10131                 </fields>
10132                 <links>
10133                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10134                 </links>
10135         </class>
10136
10137         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10138                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10139                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10140                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10141                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10142                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10143                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10144                 </fields>
10145                 <links>
10146                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10147                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10148                 </links>
10149         </class>
10150
10151         <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">
10152                 <fields oils_persist:primary="id">
10153                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10154                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10155                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10156                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10157                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10158                 </fields>
10159                 <links>
10160                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10161                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10162                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10163                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10164                 </links>
10165         </class>
10166
10167         <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">
10168                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10169                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10170                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10171                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10172                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10173                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10174                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10175                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10176                 </fields>
10177                 <links/>
10178                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10179                         <actions>
10180                                 <retrieve/>
10181                         </actions>
10182                 </permacrud>
10183         </class>
10184
10185         <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">
10186                 <fields oils_persist:primary="ptype_key">
10187                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10188                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10189                 </fields>
10190                 <links/>
10191                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10192                         <actions>
10193                                 <retrieve/>
10194                         </actions>
10195                 </permacrud>
10196         </class>
10197
10198         <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">
10199                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10200                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10201                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10202                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10203                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10204                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10205                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10206                 </fields>
10207                 <links>
10208                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10209                 </links>
10210                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10211                         <actions>
10212                                 <retrieve/>
10213                         </actions>
10214                 </permacrud>
10215         </class>
10216
10217         <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">
10218                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10219                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10220                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10221                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10222                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10223                 </fields>
10224                 <links>
10225                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10226                 </links>
10227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10228                         <actions>
10229                                 <retrieve/>
10230                         </actions>
10231                 </permacrud>
10232         </class>
10233
10234     <class
10235         id="uvs"
10236         controller="open-ils.cstore open-ils.pcrud"
10237         oils_obj:fieldmapper="url_verify::session"
10238         oils_persist:tablename="url_verify.session"
10239         reporter:label="URL Verification Session"
10240     >
10241         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10242             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10243             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10244                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10245             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10246             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10247             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10248             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10249             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10250             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10251         </fields>
10252
10253         <links>
10254             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10255             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10256             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10257             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10258             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10259         </links>
10260
10261         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10262             <actions>
10263                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10264             </actions>
10265         </permacrud>
10266
10267     </class>
10268
10269     <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">
10270         <oils_persist:source_definition>
10271             SELECT
10272                 cbrebi.id AS id,  -- so we can have a pkey in our view
10273                 uvs.id AS session,
10274                 uvs.owning_lib,
10275                 cbrebi.target_biblio_record_entry
10276             FROM url_verify.session uvs
10277             JOIN container.biblio_record_entry_bucket cbreb
10278                 ON (uvs.container = cbreb.id)
10279             JOIN container.biblio_record_entry_bucket_item cbrebi
10280                 ON (cbrebi.bucket = cbreb.id)
10281         </oils_persist:source_definition>
10282         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10283             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10284             <field reporter:label="Session" name="session" reporter:datatype="link" />
10285             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10286             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10287         </fields>
10288         <links>
10289             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10290             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10291             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10292         </links>
10293         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10294             <actions>
10295                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10296             </actions>
10297         </permacrud>
10298     </class>
10299
10300     <class
10301         id="uvus"
10302         controller="open-ils.cstore open-ils.pcrud"
10303         oils_obj:fieldmapper="url_verify::url_selector"
10304         oils_persist:tablename="url_verify.url_selector"
10305         reporter:label="URL Verification URL Selector"
10306     >
10307         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10308             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10309             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10310                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10311             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10312         </fields>
10313
10314         <links>
10315             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10316             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10317         </links>
10318
10319         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10320             <actions>
10321                 <create permission="URL_VERIFY">
10322                     <context link="session" field="owning_lib"/>
10323                 </create>
10324                 <retrieve permission="URL_VERIFY">
10325                     <context link="session" field="owning_lib"/>
10326                 </retrieve>
10327                 <update permission="URL_VERIFY">
10328                     <context link="session" field="owning_lib"/>
10329                 </update>
10330                 <delete permission="URL_VERIFY">
10331                     <context link="session" field="owning_lib"/>
10332                 </delete>
10333             </actions>
10334         </permacrud>
10335
10336     </class>
10337
10338     <class
10339         id="uvu"
10340         controller="open-ils.cstore open-ils.pcrud"
10341         oils_obj:fieldmapper="url_verify::url"
10342         oils_persist:tablename="url_verify.url"
10343         reporter:label="URL Verification URL"
10344     >
10345         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10346             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10347                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10348                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10349                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10350                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10351             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10352             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10353             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10354             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10355             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10356             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10357             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10358             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10359             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10360             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10361             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10362             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10363             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10364         </fields>
10365
10366         <links>
10367             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10368             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10369             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10370             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10371             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10372         </links>
10373
10374         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10375             <actions>
10376                 <create permission="URL_VERIFY">
10377                     <context link="session" field="owning_lib"/>
10378                 </create>
10379                 <retrieve permission="URL_VERIFY">
10380                     <context link="session" field="owning_lib"/>
10381                 </retrieve>
10382                 <update permission="URL_VERIFY">
10383                     <context link="session" field="owning_lib"/>
10384                 </update>
10385                 <delete permission="URL_VERIFY">
10386                     <context link="session" field="owning_lib"/>
10387                 </delete>
10388             </actions>
10389         </permacrud>
10390
10391     </class>
10392
10393     <class
10394         id="uvva"
10395         controller="open-ils.cstore open-ils.pcrud"
10396         oils_obj:fieldmapper="url_verify::verification_attempt"
10397         oils_persist:tablename="url_verify.verification_attempt"
10398         reporter:label="URL Verification Attempt"
10399     >
10400         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10401             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10402                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10403                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10404             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10405             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10406         </fields>
10407
10408         <links>
10409             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10410             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10411         </links>
10412
10413         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10414             <actions>
10415                 <create permission="URL_VERIFY">
10416                     <context link="session" field="owning_lib"/>
10417                 </create>
10418                 <retrieve permission="URL_VERIFY">
10419                     <context link="session" field="owning_lib"/>
10420                 </retrieve>
10421                 <update permission="URL_VERIFY">
10422                     <context link="session" field="owning_lib"/>
10423                 </update>
10424                 <delete permission="URL_VERIFY">
10425                     <context link="session" field="owning_lib"/>
10426                 </delete>
10427             </actions>
10428         </permacrud>
10429
10430     </class>
10431
10432     <class
10433         id="uvuv"
10434         controller="open-ils.cstore open-ils.pcrud"
10435         oils_obj:fieldmapper="url_verify::url_verification"
10436         oils_persist:tablename="url_verify.url_verification"
10437         reporter:label="URL Verification"
10438     >
10439         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10440             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10441                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10442                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10443             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10444             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10445             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10446             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10447                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10448         </fields>
10449
10450         <links>
10451             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10452             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10453             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10454         </links>
10455
10456         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10457             <actions>
10458                 <create permission="URL_VERIFY">
10459                     <context link="attempt" jump="session" field="owning_lib"/>
10460                 </create>
10461                 <retrieve permission="URL_VERIFY">
10462                     <context link="attempt" jump="session" field="owning_lib"/>
10463                 </retrieve>
10464                 <update permission="URL_VERIFY">
10465                     <context link="attempt" jump="session" field="owning_lib"/>
10466                 </update>
10467                 <delete permission="URL_VERIFY">
10468                     <context link="attempt" jump="session" field="owning_lib"/>
10469                 </delete>
10470             </actions>
10471         </permacrud>
10472
10473     </class>
10474
10475         <class
10476                 id="cfdi"
10477                 controller="open-ils.cstore open-ils.pcrud"
10478                 oils_obj:fieldmapper="config::filter_dialog_interface"
10479                 oils_persist:tablename="config.filter_dialog_interface"
10480                 reporter:label="FilterDialog Interface">
10481                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10482                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10483                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10484                 </fields>
10485                 <links>
10486                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10487                 </links>
10488                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10489                         <actions>
10490                                 <retrieve />
10491                         </actions>
10492                 </permacrud>
10493         </class>
10494
10495         <class
10496                 id="cfdfs"
10497                 controller="open-ils.cstore open-ils.pcrud"
10498                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10499                 oils_persist:tablename="config.filter_dialog_filter_set"
10500                 reporter:label="FilterDialog Filter Set">
10501                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10502                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10503                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10504                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10505                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10506                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10507                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10508                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10509                 </fields>
10510                 <links>
10511                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10512                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10513                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10514                 </links>
10515                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10516                         <actions>
10517                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10518                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10519                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10520                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10521                         </actions>
10522                 </permacrud>
10523
10524         </class>
10525
10526         <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">
10527                 <fields oils_persist:primary="code">
10528                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10529                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10530                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10531                 </fields>
10532                 <links/>
10533                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10534                         <actions>
10535                                 <retrieve/>
10536                         </actions>
10537                 </permacrud>
10538         </class>
10539
10540         <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">
10541                 <oils_persist:source_definition>
10542
10543             SELECT  b.id,
10544                     MAX(dcp.edit_date) AS last_delete_date
10545              FROM   biblio.record_entry b
10546                     JOIN asset.call_number cn ON (cn.record = b.id)
10547                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10548              WHERE  NOT b.deleted
10549              GROUP BY b.id
10550              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10551
10552                 </oils_persist:source_definition>
10553                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10554                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10555                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10556                 </fields>
10557                 <links>
10558                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10559                 </links>
10560                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10561                         <actions>
10562                                 <retrieve/>
10563                         </actions>
10564                 </permacrud>
10565         </class>
10566
10567         <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">
10568                 <oils_persist:source_definition>
10569
10570             -- -- 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.
10571             -- -- 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
10572             -- -- may not.
10573             -- SELECT
10574             --     bre.id AS bib_id,
10575             --     COALESCE( z.copy_count, 0 ) AS copy_count,
10576             --     COALESCE( z.hold_count, 0 ) AS hold_count,
10577             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
10578             -- FROM (
10579                 SELECT
10580                     y.bre AS id,
10581                     COALESCE( x.copy_count, 0 ) AS copy_count,
10582                     y.hold_count AS hold_count,
10583                     (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
10584                 FROM (
10585                         SELECT
10586                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
10587                             COUNT(*) AS hold_count
10588                         FROM action.hold_request h
10589                         WHERE
10590                             cancel_time IS NULL
10591                             AND fulfillment_time IS NULL
10592                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10593                         GROUP BY 1
10594                     )y LEFT JOIN (
10595                         SELECT 
10596                             (SELECT id
10597                                 FROM biblio.record_entry 
10598                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10599                             ) AS bre, 
10600                             COUNT(*) AS copy_count
10601                         FROM asset.copy
10602                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10603                         WHERE copy.holdable 
10604                             AND NOT copy.deleted 
10605                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10606                         GROUP BY 1
10607                     )x ON x.bre = y.bre
10608                 -- )z RIGHT JOIN (
10609                 --     SELECT id
10610                 --     FROM biblio.record_entry
10611                 --     WHERE NOT deleted
10612                 -- )bre ON (z.bib_id = bre.id)
10613                 
10614
10615                 </oils_persist:source_definition>
10616                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10617                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10618                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10619                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10620                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10621                 </fields>
10622                 <links>
10623                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10624                 </links>
10625                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10626                         <actions>
10627                                 <retrieve/>
10628                         </actions>
10629                 </permacrud>
10630         </class>
10631
10632         <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">
10633                 <oils_persist:source_definition>
10634             SELECT *,
10635                 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,
10636                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10637             FROM
10638                 (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
10639                     FROM
10640                         action.hold_request ahr
10641                         JOIN reporter.hold_request_record rhrr USING (id)
10642                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10643                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10644                     WHERE
10645                         ahr.cancel_time IS NULL
10646                         AND ahr.fulfillment_time IS NULL
10647                     GROUP BY bib_record, pickup_lib
10648                 )x
10649                 JOIN
10650                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10651                     FROM
10652                         action.hold_request ahr
10653                         JOIN reporter.hold_request_record rhrr USING (id)
10654                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10655                     WHERE
10656                         ahr.cancel_time IS NULL
10657                         AND ahr.fulfillment_time IS NULL
10658                     GROUP BY bib_record
10659                 )y
10660                 USING (id)
10661                 </oils_persist:source_definition>
10662                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10663                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10664                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10665                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10666                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10667                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10668                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10669                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10670                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10671                 </fields>
10672                 <links>
10673                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10674                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10675                 </links>
10676                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10677                         <actions>
10678                                 <retrieve/>
10679                         </actions>
10680                 </permacrud>
10681         </class>
10682
10683         <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) ">
10684                 <oils_persist:source_definition>
10685             WITH counts_at_ou AS (
10686                 SELECT bib_record, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library, 
10687                     COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
10688                 FROM action.hold_request ahr
10689                 JOIN reporter.hold_request_record rhrr USING (id)
10690                 LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10691                 LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10692                 WHERE ahr.cancel_time IS NULL
10693                 AND ahr.fulfillment_time IS NULL
10694                 GROUP BY bib_record, pickup_lib
10695             )
10696             SELECT *,
10697                 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,
10698                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10699             FROM
10700                 (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
10701                 FROM actor.org_unit aou
10702                 JOIN counts_at_ou cao ON (cao.pickup_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))) 
10703                 GROUP BY bib_record, pickup_lib_or_desc
10704                 )x
10705                 JOIN
10706                 (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10707                     FROM
10708                         action.hold_request ahr
10709                         JOIN reporter.hold_request_record rhrr USING (id)
10710                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10711                     WHERE
10712                         ahr.cancel_time IS NULL
10713                         AND ahr.fulfillment_time IS NULL
10714                     GROUP BY bib_record
10715                 )y
10716                 USING (id)
10717                 </oils_persist:source_definition>
10718                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10719                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10720                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
10721                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
10722                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
10723                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10724                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10725                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
10726                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10727                 </fields>
10728                 <links>
10729                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10730                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
10731                 </links>
10732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10733                         <actions>
10734                                 <retrieve/>
10735                         </actions>
10736                 </permacrud>
10737         </class>
10738
10739         <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">
10740                 <oils_persist:source_definition>
10741             SELECT
10742                 ac.id,
10743                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10744                 MAX(actac.xact_start) AS last_circ
10745             FROM asset.copy ac
10746                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10747             GROUP BY ac.id
10748
10749             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10750             --SELECT
10751             --    ac.id,
10752             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10753             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10754             --FROM asset.copy ac
10755             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10756             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10757             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10758                 </oils_persist:source_definition>
10759                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10760                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10761                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10762                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10763                 </fields>
10764                 <links>
10765                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10766                 </links>
10767                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10768                         <actions>
10769                                 <retrieve/>
10770                         </actions>
10771                 </permacrud>
10772         </class>
10773
10774         <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">
10775                 <fields oils_persist:primary="id">
10776                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10777                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10778                 </fields>
10779                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10780                         <actions>
10781                                 <retrieve/>
10782                         </actions>
10783                 </permacrud>
10784         </class>
10785
10786         <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">
10787                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10788                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10789                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10790                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10791                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10792                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10793                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10794                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10795                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10796                 </fields>
10797                 <links>
10798                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10799                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10800                 </links>
10801                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10802                         <actions>
10803                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10804                                 <retrieve/>
10805                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10806                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10807                         </actions>
10808                 </permacrud>
10809         </class>
10810
10811         <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">
10812                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10813                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10814                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10815                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10816                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10817                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10818                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10819                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10820                 </fields>
10821                 <links>
10822                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10823                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10824                 </links>
10825                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10826                         <actions>
10827                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10828                                 <retrieve/>
10829                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10830                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10831                         </actions>
10832                 </permacrud>
10833         </class>
10834
10835
10836         <!-- ********************************************************************************************************************* -->
10837         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10838         <!-- ********************************************************************************************************************* -->
10839         <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">
10840                 <fields oils_persist:primary="id">
10841                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10842                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10843                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10844                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10845                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10846                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10847                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10848                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10849                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10850                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10851                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10852                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10853                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10854                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10855                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10856                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10857                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10858                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10859                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10860                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10861                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10862                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10863                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10864                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10865                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10866                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10867                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10868                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10869                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10870                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10871                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10872                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10873                 </fields>
10874                 <links>
10875                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10876                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10877                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10878                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10879                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10880                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10881                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10882                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10883                 </links>
10884         </class>
10885
10886         <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">
10887                 <fields oils_persist:primary="id">
10888                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10889                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10890                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10891                 </fields>
10892                 <links>
10893                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10894                 </links>
10895         </class>
10896
10897         <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">
10898                 <fields oils_persist:primary="id">
10899                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10900                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10901                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10902                 </fields>
10903                 <links>
10904                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10905                 </links>
10906         </class>
10907
10908         <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">
10909                 <fields oils_persist:primary="id">
10910                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10911
10912                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10913                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10914                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10915
10916                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10917                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10918                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10919
10920                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10921                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10922
10923                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10924                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10925                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10926
10927                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10928                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10929
10930                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10931                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10932                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10933
10934                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10935                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10936                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10937
10938                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10939                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10940                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10941                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10942
10943                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10944                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10945
10946                 </fields>
10947                 <links>
10948                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10949                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10950                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10951                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10952                 </links>
10953         </class>
10954
10955         <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">
10956                 <oils_persist:source_definition>
10957
10958             SELECT
10959                 po.ordering_agency AS ordering_agency,
10960                 po.id AS purchase_order,
10961                 li.id AS lineitem,
10962                 lid.id AS lineitem_detail,
10963                 cpa.id AS claim_policy_action
10964             FROM
10965                 acq.lineitem_detail lid
10966                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10967                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10968                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10969                 JOIN acq.claim_policy_action cpa ON (
10970                     cpa.claim_policy = cp.id
10971
10972                     -- we only care about claim policy actions whose claim
10973                     -- interval we'd reached or exceeded
10974                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10975
10976                     -- filter out all claim policy actions where claim events
10977                     -- have occurred on or after the action's action_interval
10978                     AND NOT EXISTS (
10979                         SELECT 1
10980                         FROM
10981                             acq.claim_event evt
10982                             JOIN acq.claim claim ON (
10983                                 claim.id = evt.claim
10984                                 AND claim.lineitem_detail = lid.id
10985                             )
10986                         WHERE
10987                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10988                     )
10989                 )
10990             WHERE
10991                 lid.cancel_reason IS NULL
10992                 AND li.cancel_reason IS NULL -- belt/suspenders
10993                 AND po.cancel_reason IS NULL -- belt/suspenders
10994                 AND lid.recv_time IS NULL
10995                 AND po.state = 'on-order'
10996             ORDER BY 1, 2, 3, 4, 5
10997
10998                 </oils_persist:source_definition>
10999                 <fields>
11000                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
11001                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
11002                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11003                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11004                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
11005                 </fields>
11006                 <links>
11007                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
11008                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
11009                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11010                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11011                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
11012                 </links>
11013         </class>
11014         <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">
11015                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11016                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11017                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11018                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11019                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11020                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11021                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11022                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11023                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11024                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11025                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11026                 </fields>
11027                 <links>
11028                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11029                 </links>
11030     </class>
11031         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
11032                 <oils_persist:source_definition>
11033             SELECT * FROM acq.lineitem_summary 
11034                                 WHERE item_count > (invoice_count + cancel_count)
11035         </oils_persist:source_definition>
11036                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11037                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11038                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11039                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11040                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11041                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11042                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11043                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11044                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11045                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11046                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11047                 </fields>
11048                 <links>
11049                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11050                 </links>
11051     </class>
11052         <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">
11053                 <oils_persist:source_definition>
11054
11055                         SELECT  t.*
11056                           FROM  action.transit_copy t
11057                                 JOIN actor.org_unit AS s ON (t.source = s.id)
11058                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
11059                           WHERE s.parent_ou &lt;&gt; d.parent_ou
11060
11061                 </oils_persist:source_definition>
11062                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
11063                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
11064                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
11065                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
11066                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
11067                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
11068                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
11069                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
11070                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
11071                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
11072                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
11073                 </fields>
11074                 <links>
11075                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
11076                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
11077                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
11078                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
11079                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11080                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
11081                 </links>
11082         </class>
11083
11084     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
11085                 <oils_persist:source_definition>
11086
11087         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
11088                 SELECT
11089                         cp.id as copy,
11090                         COUNT(circ.id),
11091                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11092                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11093                 FROM
11094                         asset.copy cp
11095                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
11096                 GROUP BY 1, 3, 4
11097                 UNION ALL
11098                 SELECT
11099                         cp.id as copy,
11100                         COUNT(circ.id),
11101                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11102                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11103                 FROM
11104                         asset.copy cp
11105                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
11106                 GROUP BY 1, 3, 4
11107                 UNION ALL
11108                 SELECT
11109                         id as copy,
11110                         circ_count,
11111                         -1 AS year,
11112                         false as is_renewal
11113                 FROM
11114                         extend_reporter.legacy_circ_count
11115         )x GROUP BY 1, 3, 4
11116
11117                 </oils_persist:source_definition>
11118         <fields>
11119             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
11120             <field reporter:label="Count" name="count" reporter:datatype="int"/>
11121             <field reporter:label="Year" name="year" reporter:datatype="int"/>
11122             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
11123         </fields>
11124                 <links>
11125                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11126                 </links>
11127                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11128                         <actions>
11129                                 <retrieve/>
11130                         </actions>
11131                 </permacrud>
11132     </class>
11133
11134         <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">
11135                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
11136                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
11137                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
11138                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
11139                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
11140                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
11141                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
11142                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
11143                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
11144                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
11145                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
11146                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
11147                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
11148                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
11149                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
11150                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
11151                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
11152                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
11153                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
11154                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
11155                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
11156                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
11157                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
11158                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
11159                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
11160                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
11161                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
11162                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
11163                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
11164                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
11165                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
11166                 </fields>
11167                 <links>
11168                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
11169                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
11170                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
11171                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11172                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
11173                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11174                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11175                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
11176                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
11177                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
11178                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
11179                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
11180                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
11181                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
11182                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
11183                 </links>
11184         </class>
11185
11186     <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">
11187         <fields oils_persist:primary="id">
11188             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11189             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11190             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11191             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11192             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11193             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11194             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11195             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11196             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11197             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11198             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11199             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11200             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11201             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11202             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11203             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11204             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11205             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11206             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11207             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11208             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11209             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11210             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11211             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11212             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11213             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11214             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11215             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11216             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11217             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11218             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11219             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11220             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11221             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11222         </fields>
11223         <links>
11224             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11225             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11226             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11227             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11228             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11229             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11230             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11231             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11232         </links>
11233     </class>
11234
11235     <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">
11236         <fields oils_persist:primary="id">
11237             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11238             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11239             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11240             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11241         </fields>
11242         <links>
11243             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11244             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11245         </links>
11246     </class>
11247
11248     <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">
11249         <fields oils_persist:primary="owning_lib">
11250             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11251             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11252             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11253         </fields>
11254         <links>
11255             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11256         </links>
11257     </class>
11258
11259     <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">
11260         <fields oils_persist:primary="id">
11261             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11262             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11263             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11264             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11265             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11266         </fields>
11267         <links>
11268             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11269             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11270             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11271         </links>
11272     </class>
11273
11274     <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">
11275         <fields oils_persist:primary="circ_lib">
11276             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11277             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11278             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11279             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11280         </fields>
11281         <links>
11282             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11283             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11284         </links>
11285     </class>
11286
11287     <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">
11288         <fields oils_persist:primary="id">
11289             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11290             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11291             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11292             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11293             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11294         </fields>
11295         <links>
11296             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11297             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11298             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11299         </links>
11300     </class>
11301
11302     <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">
11303         <fields oils_persist:primary="home_ou">
11304             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11305             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11306             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11307             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11308         </fields>
11309         <links>
11310             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11311             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11312         </links>
11313     </class>
11314         <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">
11315                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11316                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11317                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11318                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11319                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11320                 </fields>
11321                 <links>
11322                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11323                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11324                 </links>
11325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11326                         <actions>
11327                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11328                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11329                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11330                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11331                         </actions>
11332                 </permacrud>
11333         </class>
11334         <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">
11335                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11336                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11337                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11338                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11339                 </fields>
11340                 <links>
11341                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11342                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11343                         </links>
11344                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11345                 <actions>
11346                                 <create permission="ADMIN_ACQ_FUND_TAG">
11347                                         <context link="tag" field="owner"/>
11348                                 </create>
11349                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11350                                         <context link="tag" field="owner"/>
11351                                 </retrieve>
11352                                 <update permission="ADMIN_ACQ_FUND_TAG">
11353                                         <context link="tag" field="owner"/>
11354                                 </update>
11355                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11356                                         <context link="tag" field="owner"/>
11357                                 </delete>
11358                         </actions>
11359                 </permacrud>
11360         </class>
11361         <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">
11362                 <oils_persist:source_definition><![CDATA[
11363                 SELECT
11364                         poi.purchase_order AS purchase_order,
11365                         ii.invoice AS invoice,
11366                         NULL AS lineitem,
11367                         poi.id AS po_item,
11368                         NULL AS picklist
11369                 FROM
11370                         acq.po_item poi
11371                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11372                 UNION SELECT
11373                         jub.purchase_order AS purchase_order,
11374                         ie.invoice AS invoice,
11375                         jub.id AS lineitem,
11376                         NULL AS po_item,
11377                         jub.picklist AS picklist
11378                 FROM
11379                         acq.lineitem jub
11380                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11381                 UNION SELECT
11382                         ii.purchase_order AS purchase_order,
11383                         ii.invoice AS invoice,
11384                         NULL AS lineitem,
11385                         NULL AS po_item,
11386                         NULL AS picklist
11387                 FROM
11388                         acq.invoice_item ii
11389                 WHERE ii.po_item IS NULL
11390                 UNION SELECT
11391                         ie.purchase_order AS purchase_order,
11392                         ie.invoice AS invoice,
11393                         NULL AS lineitem,
11394                         NULL AS po_item,
11395                         NULL AS picklist
11396                 FROM
11397                         acq.invoice_entry ie
11398                 WHERE ie.lineitem IS NULL
11399                 UNION SELECT
11400                         NULL AS purchase_order,
11401                         NULL AS invoice,
11402                         jub.id AS lineitem,
11403                         NULL AS po_item,
11404                         jub.picklist AS picklist
11405                 FROM
11406                         acq.lineitem jub
11407                 WHERE jub.purchase_order IS NULL
11408                 ]]></oils_persist:source_definition>
11409                 <fields>
11410                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11411                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11412                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11413                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11414                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11415                 </fields>
11416                 <links>
11417                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11418                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11419                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11420                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11421                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11422                 </links>
11423         </class>
11424         <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">
11425                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11426                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11427                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11428                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11429                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11430                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11431                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11432                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11433                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11434                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11435                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11436                 </fields>
11437                 <links>
11438                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11439                 </links>
11440                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11441                         <actions>
11442                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11443                                 <retrieve/>
11444                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11445                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11446                         </actions>
11447                 </permacrud>
11448         </class>
11449
11450         <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">
11451                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11452                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11453                         <field name="date_applied" reporter:datatype="timestamp"/>
11454                         <field name="org" reporter:datatype="org_unit"/>
11455                         <field name="original_value" reporter:datatype="text"/>
11456                         <field name="new_value" reporter:datatype="text"/>
11457                         <field name="field_name" reporter:datatype="link"/>
11458                 </fields>
11459                 <links>
11460                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11461                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11462                 </links>
11463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11464                         <actions>
11465                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11466                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11467                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11468                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11469                         </actions>
11470                 </permacrud>
11471         </class>
11472         <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">
11473                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11474                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11475                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11476                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11477                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11478                 </fields>
11479                 <links>
11480                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11481                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11482                 </links>
11483         </class>
11484         <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">
11485                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11486                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11487                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11488                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11489                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11490                 </fields>
11491                 <links>
11492                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11493                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11494                 </links>
11495         </class>
11496         <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">
11497                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11498                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11499                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11500                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11501                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11502                 </fields>
11503                 <links>
11504                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11505                 </links>
11506                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11507                         <actions>
11508                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11509                                 <retrieve/>
11510                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11511                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11512                         </actions>
11513                 </permacrud>
11514         </class>
11515         <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">
11516                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11517                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11518                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11519                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11520                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11521                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11522                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11523                 </fields>
11524                 <links>
11525                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11526                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11527                 </links>
11528                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11529                         <actions>
11530                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11531                                 <retrieve/>
11532                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11533                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11534                         </actions>
11535                 </permacrud>
11536         </class>
11537         <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">
11538         <oils_persist:source_definition>
11539         SELECT ahcm.target_copy AS id,count(*) AS count
11540          FROM
11541          action.hold_request ahr,
11542          action.hold_copy_map ahcm
11543          WHERE
11544          ahr.cancel_time IS NULL AND
11545          ahr.fulfillment_time IS NULL AND
11546          ahr.capture_time IS NULL AND
11547          ahr.id = ahcm.hold
11548          GROUP BY ahcm.target_copy
11549         </oils_persist:source_definition>
11550         <fields oils_persist:primary="id">
11551             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11552             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
11553         </fields>
11554         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11555             <actions>
11556                <retrieve/>
11557             </actions>
11558         </permacrud>
11559         </class>
11560
11561         <!-- ********************************************************************************************************************* -->
11562
11563 </IDL>
11564
11565 <!--
11566     vim:noet:ts=4:sw=4:
11567 -->