]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
c883f47c868095df80dc518cdbcf7e01aafcfea2
[Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                 </fields>
98                 <links>
99                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
100                 </links>
101         </class>
102
103         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
104                 <fields>
105                         <field name="id" oils_persist:virtual="true" />
106                         <field name="children" oils_persist:virtual="true" />
107                         <field name="owner_doc" oils_persist:virtual="true" />
108                         <field name="intra_doc_id" oils_persist:virtual="true" />
109                         <field name="parent_node" oils_persist:virtual="true" />
110                         <field name="node_type" oils_persist:virtual="true" />
111                         <field name="namespace_uri" oils_persist:virtual="true" />
112                         <field name="name" oils_persist:virtual="true" />
113                         <field name="value" oils_persist:virtual="true" />
114                 </fields>
115         </class>
116
117         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
118                 <fields>
119                         <field name="title" oils_persist:virtual="true" />
120                         <field name="author" oils_persist:virtual="true" />
121                         <field name="doc_id" oils_persist:virtual="true" />
122                         <field name="doc_type" oils_persist:virtual="true" />
123                         <field name="pubdate" oils_persist:virtual="true" />
124                         <field name="isbn" oils_persist:virtual="true" />
125                         <field name="publisher" oils_persist:virtual="true" />
126                         <field name="tcn" oils_persist:virtual="true" />
127                         <field name="subject" oils_persist:virtual="true" />
128                         <field name="types_of_resource" oils_persist:virtual="true" />
129                         <field name="call_numbers" oils_persist:virtual="true" />
130                         <field name="edition" oils_persist:virtual="true" />
131                         <field name="online_loc" oils_persist:virtual="true" />
132                         <field name="synopsis" oils_persist:virtual="true" />
133                         <field name="physical_description" oils_persist:virtual="true" />
134                         <field name="toc" oils_persist:virtual="true" />
135                         <field name="copy_count" oils_persist:virtual="true" />
136                         <field name="series" oils_persist:virtual="true" />
137                         <field name="serials" oils_persist:virtual="true" />
138                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
139                 </fields>
140         </class>
141
142         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
143                 <fields>
144                         <field name="err_msg" oils_persist:virtual="true" />
145                         <field name="type" oils_persist:virtual="true" />
146                 </fields>
147         </class>
148
149         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
150                 <fields>
151                         <field name="err_msg" oils_persist:virtual="true" />
152                         <field name="type" oils_persist:virtual="true" />
153                 </fields>
154         </class>
155
156         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
157                 <fields oils_persist:primary="matchpoint">
158                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
159                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
160                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
164                 </links>
165         </class>
166
167         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
168         <!-- when the time is right, turn me into a view.  -->
169                 <fields>
170             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
171             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
172             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
173             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
174             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
175             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
176             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
179             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
180                 </fields>
181         </class>
182
183         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
184                 <fields>
185                         <field name="public_name" oils_persist:virtual="true" />
186                         <field name="target_url" oils_persist:virtual="true" />
187                         <field name="target_coverage" oils_persist:virtual="true" />
188                         <field name="target_embargo" oils_persist:virtual="true" />
189                 </fields>
190         </class>
191
192         <!-- Actually in the DB -->
193         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
194                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
195                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
196                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
197                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
198                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
199                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
200                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
201                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
202                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
203                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
204                 </fields>
205                 <links>
206                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
207                 </links>
208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
209                         <actions>
210                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
211                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
212                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
213                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
214                         </actions>
215                 </permacrud>
216         </class>
217
218         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
219                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
220                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
221                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
222                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
223                 </fields>
224                 <links>
225                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
226                 </links>
227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
228                         <actions>
229                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
230                     <context link="grp" field="owner"/>
231                 </create>
232                                 <retrieve/>
233                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
234                     <context link="grp" field="owner"/>
235                 </update>
236                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
237                     <context link="grp" field="owner"/>
238                 </delete>
239                         </actions>
240                 </permacrud>
241         </class>
242
243         <class  id="rrbs" 
244             controller="open-ils.cstore open-ils.pcrud" 
245             oils_obj:fieldmapper="rating::record_badge_score" 
246             oils_persist:tablename="rating.record_badge_score" 
247             reporter:label="Statistical Popularity Badge">
248                 <fields oils_persist:primary="id" 
249                 oils_persist:sequence="rating.record_badge_score_id_seq">
250                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
251                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
252                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
253                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
254                 </fields>
255         <links>
256             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
257             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
258         </links>
259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
260                         <actions>
261                                 <retrieve/>
262                         </actions>
263                 </permacrud>
264         </class>
265
266         <class  id="rp" 
267             controller="open-ils.cstore open-ils.pcrud" 
268             oils_obj:fieldmapper="rating::popularity_parameter" 
269             oils_persist:tablename="rating.popularity_parameter" 
270             reporter:label="Statistical Popularity Parameter">
271                 <fields oils_persist:primary="id" 
272                 oils_persist:sequence="rating.popularity_parameter_id_seq">
273                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
274                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
275                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
276                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
277                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
278                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
279                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
280                 </fields>
281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
282                         <actions>
283                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
284                                 <retrieve/>
285                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
286                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
287                         </actions>
288                 </permacrud>
289         </class>
290
291         <class  id="rb" 
292             controller="open-ils.cstore open-ils.pcrud" 
293             oils_obj:fieldmapper="rating::badge" 
294             oils_persist:tablename="rating.badge" 
295             reporter:label="Statistical Popularity Badge">
296                 <fields oils_persist:primary="id" 
297                 oils_persist:sequence="rating.badge_id_seq">
298                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
299                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
301                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
302                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
303                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
304                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
305                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
306                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
307                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
308                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
309                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
310                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
311                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
312                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
313                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
314                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
315                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
316                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
317                 </fields>
318                 <links>
319                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
320                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
321                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
322                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
323                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
324                 </links>
325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
326                         <actions>
327                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
328                                 <retrieve/>
329                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
330                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
331                         </actions>
332                 </permacrud>
333         </class>
334
335         <class  id="vibtg" 
336             controller="open-ils.cstore open-ils.pcrud" 
337             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
338             oils_persist:tablename="vandelay.import_bib_trash_group" 
339             reporter:label="Import/Overlay Field Groups for Removal">
340                 <fields oils_persist:primary="id" 
341                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
342                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
343                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
344                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
345                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
346                 </fields>
347                 <links>
348                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
349                 </links>
350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
351                         <actions>
352                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
353                                 <retrieve/>
354                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
355                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                         </actions>
357                 </permacrud>
358         </class>
359
360
361         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
362                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
363                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
364                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
365                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
366                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
367                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
368                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
369                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
370                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
371                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
372                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
373                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
374                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
375                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
376                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
377                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
378                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
379                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
380                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
381                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
382                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
383                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
384                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
385                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
386                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
387                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
388                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
389                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
390                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
391                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
392                 </fields>
393                 <links>
394                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
395                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
396                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <create permission="CREATE_IMPORT_ITEM">
402                     <context link="definition" field="owner"/>
403                                 </create>
404                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
405                     <context link="definition" field="owner"/>
406                                 </retrieve>
407                                 <update permission="UPDATE_IMPORT_ITEM">
408                     <context link="definition" field="owner"/>
409                                 </update>
410                                 <delete permission="DELETE_IMPORT_ITEM">
411                     <context link="definition" field="owner"/>
412                                 </delete>
413                         </actions>
414                 </permacrud>
415         </class>
416
417         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
418                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
419                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
420                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
421                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
422                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
423                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
424                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
425                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
426                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
427                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
428                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
429                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
430                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
431                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
432                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
433                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
434                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
435                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
436                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
437                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
438                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
439                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
440                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
441                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
442                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
443                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
444                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
445                 </fields>
446                 <links>
447                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
448                 </links>
449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
450                         <actions>
451                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
452                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
453                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
454                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                         </actions>
456                 </permacrud>
457         </class>
458
459         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
460                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
461                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
462                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
463                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
464                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
465                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
466                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
467                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
468                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
469                 </fields>
470                 <links>
471                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
472                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
473                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
474                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
475                 </links>
476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
477                         <actions>
478                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
479                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
480                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
481                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
482                         </actions>
483                 </permacrud>
484         </class>
485
486         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
487                 <fields oils_persist:primary="code">
488                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
489                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
490                 </fields>
491                 <links>
492                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
493                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
494                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
495                 </links>
496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
497                         <actions>
498                                 <retrieve/>
499                         </actions>
500                 </permacrud>
501         </class>
502
503         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
504                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
505                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
506                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
507                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
508                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
509                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
510                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
511                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
512                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
513                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
514                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
515                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
516                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
517                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
518                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
519                 </fields>
520                 <links>
521                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
522                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
523                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
524                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
525             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
526             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
527             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
528                 </links>
529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
530                         <actions>
531                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
532                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
533                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
534                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
535                         </actions>
536                 </permacrud>
537         </class>
538
539         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
540                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
541                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
542                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
543                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
544                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
545                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
546                 </fields>
547                 <links/>
548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
549                         <actions>
550                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
551                 <retrieve/>
552                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
553                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
554                         </actions>
555                 </permacrud>
556         </class>
557
558         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
559                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
560                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
561                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
562                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
563                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
564                 </fields>
565                 <links>
566                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
567                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
568                 </links>
569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
570                         <actions>
571                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
572                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
573                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
574                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
575                         </actions>
576                 </permacrud>
577         </class>
578
579         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
580                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
581                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
582                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
583                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
584                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
585                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
586                 </fields>
587                 <links>
588                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
589                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
590                 </links>
591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
592                         <actions>
593                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
594                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
595                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
596                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
597                         </actions>
598                 </permacrud>
599         </class>
600
601         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
602                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
603                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
604                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
605                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
606                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
607                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
608                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
609                 </fields>
610                 <links>
611                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
612                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
613                 </links>
614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
615                         <actions>
616                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                         </actions>
621                 </permacrud>
622         </class>
623
624         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
625                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
626                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
627                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
628                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
629                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
630                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
631                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
632                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
633                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
634                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
635                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
636                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
637                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
638                 </fields>
639                 <links>
640                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
641                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
642                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
643             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
644             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
645                 </links>
646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
647                         <actions>
648                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
649                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
650                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
651                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                         </actions>
653                 </permacrud>
654         </class>
655
656         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
657                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
658                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
659                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
660                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
661                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
662                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
663                 </fields>
664                 <links/>
665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
666                         <actions>
667                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
668                 <retrieve/>
669                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
670                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                         </actions>
672                 </permacrud>
673         </class>
674
675         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
676                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
677                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
678                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
679                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
680                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
681                 </fields>
682                 <links>
683                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
684                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
685                 </links>
686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687                         <actions>
688                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
689                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
690                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
691                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                         </actions>
693                 </permacrud>
694         </class>
695
696         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
697                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
698                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
699                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
700                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
701                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
702                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
703                 </fields>
704                 <links>
705                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
706                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
707                 </links>
708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
709                         <actions>
710                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
711                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
712                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
713                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                         </actions>
715                 </permacrud>
716         </class>
717
718         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
719                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
720                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
721                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
722                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
723                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
724                 </fields>
725                 <links>
726                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
727                 </links>
728                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
729                         <actions>
730                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
731                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
732                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
733                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                         </actions>
735                 </permacrud>
736         </class>
737
738         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
739                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
740                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
741                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
742                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
743                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
744                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
745                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
746                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
747             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
748                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
749                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
750                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
751                 </fields>
752                 <links>
753                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
754                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
755                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
756                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
757                 </links>
758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
759                         <actions>
760                                 <create permission="ADMIN_IMPORT_MATCH_SET">
761                     <context link="match_set" field="owner"/>
762                                 </create>
763                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
764                     <context link="match_set" field="owner"/>
765                                 </retrieve>
766                                 <update permission="ADMIN_IMPORT_MATCH_SET">
767                     <context link="match_set" field="owner"/>
768                                 </update>
769                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
770                     <context link="match_set" field="owner"/>
771                                 </delete>
772                         </actions>
773                 </permacrud>
774         </class>
775
776         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
777                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
778                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
779                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
780                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
781                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
782                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
783                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
784                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
785                 </fields>
786                 <links>
787                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
788                 </links>
789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
790                         <actions>
791                                 <create permission="ADMIN_IMPORT_MATCH_SET">
792                     <context link="match_set" field="owner"/>
793                                 </create>
794                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
795                     <context link="match_set" field="owner"/>
796                                 </retrieve>
797                                 <update permission="ADMIN_IMPORT_MATCH_SET">
798                     <context link="match_set" field="owner"/>
799                                 </update>
800                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
801                     <context link="match_set" field="owner"/>
802                                 </delete>
803                         </actions>
804                 </permacrud>
805         </class>
806
807         <class id="vst" controller="open-ils.cstore open-ils.pcrud" 
808                 oils_obj:fieldmapper="vandelay::session_tracker" 
809                 oils_persist:tablename="vandelay.session_tracker" 
810                 reporter:label="Vandelay Session Tracker">
811                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.session_tracker_id_seq">
812                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
813                         <field reporter:label="Session Key" name="session_key" reporter:datatype="text"/>
814                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
815                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
816                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
817                         <field reporter:label="Record Type" name="record_type" reporter:datatype="text"/>
818                         <!-- queue doesn't use datatype 'link' because it may refer to a bib
819                                          queue or an auth queue and there's no IDL class for vandelay.queue .
820                                          parent table.
821                         -->
822                         <field reporter:label="Source Queue" name="queue" reporter:datatype="int"/>
823                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestsamp"/>
824                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestsamp"/>
825                         <field reporter:label="State" name="state" reporter:datatype="text"/>
826                         <field reporter:label="Action Type" name="action_type" reporter:datatype="text"/>
827                         <field reporter:label="Total Actions" name="total_actions" reporter:datatype="int"/>
828                         <field reporter:label="Actions Performed" name="actions_performed" reporter:datatype="int"/>
829                 </fields>
830                 <links>
831                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
832                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
833                 </links>
834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
835                         <actions>
836                                 <!-- created by the API -->
837                                 <retrieve global_required="true"
838                                         permission="CREATE_BIB_IMPORT_QUEUE CREATE_AUTHORITY_IMPORT_QUEUE"/>
839                                 <update global_required="true"
840                                         permission="UPDATE_BIB_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE">
841                                         <context link="workstation" field="owning_lib"/>
842                                 </update>
843                                 <delete 
844                                         permission="DELETE_BIB_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE">
845                                         <context link="workstation" field="owning_lib"/>
846                                 </delete>
847                         </actions>
848                 </permacrud>
849         </class>
850
851         <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">
852                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
853                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
854                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
855                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
856                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
857                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
858                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
859                 </fields>
860                 <links>
861                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
862                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
863                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
864                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
865                 </links>
866         </class>
867
868     <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">
869         <fields oils_persist:primary="name">
870             <field reporter:label="Name" name="name" reporter:datatype="text"/>
871             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
872             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
873             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
874         </fields>
875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
876             <actions>
877                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
878                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
879                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
880                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
881             </actions>
882         </permacrud>
883     </class>
884
885     <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">
886         <fields oils_persist:primary="id">
887             <field reporter:label="ID" name="id" reporter:datatype="id"/>
888             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
889             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
890             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
891             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
892         </fields>
893         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
894             <actions>
895                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
896                 <retrieve/>
897                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
898                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
899             </actions>
900         </permacrud>
901     </class>
902
903         <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">
904                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
905                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
906                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
907                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
908                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
909                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
910                 </fields>
911                 <links>
912                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
913                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
914                 </links>
915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
916             <actions>
917                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
918                 <retrieve/>
919                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
920                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
921             </actions>
922         </permacrud>
923         </class>
924
925         <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">
926                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
927                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
928                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
929                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
930         </fields>
931         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
932             <actions>
933                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
934                 <retrieve/>
935                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
936                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
937             </actions>
938         </permacrud>
939         </class>
940
941         <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">
942                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
943                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
944                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
945                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
946                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
947                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
948                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
949                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
950                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
951                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
952                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
953                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
954         </fields>
955                 <links>
956                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
957                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
958         </links>
959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
960             <actions>
961                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
962                 <retrieve/>
963                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
964                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
965             </actions>
966         </permacrud>
967         </class>
968
969         <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">
970                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
971                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
972                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
973                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
974                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
975                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
976                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
977                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
978                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
979                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
980                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
981         </fields>
982                 <links>
983                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
984                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
985         </links>
986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
987             <actions>
988                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
989                 <retrieve/>
990                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
991                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
992             </actions>
993         </permacrud>
994         </class>
995
996         <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">
997                 <fields oils_persist:primary="name">
998                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
999                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1000                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1001                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
1002                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
1003                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
1004                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
1005                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
1006                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
1007                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
1008                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1009                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1010                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
1011                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
1012                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
1013                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
1014                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
1015                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
1016                 </fields>
1017                 <links>
1018                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
1019                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
1020                 </links>
1021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1022             <actions>
1023                 <create permission="ADMIN_SVF" global_required="true"/>
1024                 <retrieve/>
1025                 <update permission="ADMIN_SVF" global_required="true"/>
1026                 <delete permission="ADMIN_SVF" global_required="true"/>
1027             </actions>
1028         </permacrud>
1029         </class>
1030
1031         <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">
1032                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
1033                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1034                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
1035                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1036             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
1037                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
1038                 </fields>
1039                 <links/>
1040         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1041             <actions>
1042                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
1043                 <retrieve/>
1044                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1045                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1046             </actions>
1047         </permacrud>
1048         </class>
1049
1050         <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">
1051                 <fields oils_persist:primary="coded_value">
1052                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1053                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1054                 </fields>
1055                 <links>
1056                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1057                 </links>
1058         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1059             <actions>
1060                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1061                 <retrieve/>
1062                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1063                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1064             </actions>
1065         </permacrud>
1066         </class>
1067
1068         <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">
1069                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1070                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1071                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1072                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1073                 </fields>
1074                 <links>
1075                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1076                 </links>
1077         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1078             <actions>
1079                 <retrieve/>
1080             </actions>
1081         </permacrud>
1082         </class>
1083
1084
1085         <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">
1086                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1087                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1088                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1089                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1090                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1091                 </fields>
1092                 <links>
1093                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1094                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1095                 </links>
1096         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1097             <actions>
1098                 <retrieve/>
1099             </actions>
1100         </permacrud>
1101         </class>
1102
1103
1104         <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">
1105                 <fields oils_persist:primary="source">
1106                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1107                         <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 -->
1108                 </fields>
1109                 <links>
1110                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1111                 </links>
1112         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1113             <actions>
1114                 <retrieve/>
1115             </actions>
1116         </permacrud>
1117         </class>
1118
1119         <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">
1120                 <fields>
1121                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1122                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1123                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1124                 </fields>
1125                 <links>
1126                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1127                 </links>
1128         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1129             <actions>
1130                 <retrieve/>
1131             </actions>
1132         </permacrud>
1133         </class>
1134
1135         <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">
1136                 <fields oils_persist:primary="id">
1137                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1138                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1139                 </fields>
1140                 <links>
1141                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1142                 </links>
1143         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1144             <actions>
1145                 <retrieve/>
1146             </actions>
1147         </permacrud>
1148         </class>
1149
1150         <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">
1151                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1152                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1153                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1154                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1155                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1156                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1157                 </fields>
1158                 <links>
1159                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1160                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1161                 </links>
1162         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1163             <actions>
1164                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1165                 <retrieve/>
1166                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1167                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1168             </actions>
1169         </permacrud>
1170         </class>
1171
1172         <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">
1173                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1174                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1175                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1176                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1177                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1178                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1179                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1180                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1181             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1182             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1183             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1184                 </fields>
1185                 <links>
1186                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1187                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1188                 </links>
1189         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1190             <actions>
1191                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1192                 <retrieve/>
1193                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1194                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1195             </actions>
1196         </permacrud>
1197         </class>
1198
1199         <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">
1200                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1201                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1202                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1203                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1204                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1205                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1206                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1207                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1208                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1209                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1210                 </fields>
1211                 <links>
1212                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1213                 </links>
1214         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1215             <actions>
1216                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1217                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1218                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1219                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1220             </actions>
1221         </permacrud>
1222         </class>
1223
1224     <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">
1225         <fields oils_persist:primary="name">
1226             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1227             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1228             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1229             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1230             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1231             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1232             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1233             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1234             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1235             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1236         </fields>
1237         <links>
1238             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1239             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1240         </links>
1241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1242             <actions>
1243                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1244                 <retrieve/>
1245                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1246                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1247             </actions>
1248         </permacrud>
1249     </class>
1250
1251     <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">
1252         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1253             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1254             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1255             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1256             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1257             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1258             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1259             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1260         </fields>
1261         <links>
1262             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1263         </links>
1264         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1265             <actions>
1266                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1267                 <retrieve/>
1268                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1269                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1270             </actions>
1271         </permacrud>
1272     </class>
1273
1274     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1275                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1276                         oils_persist:tablename="config.z3950_index_field_map" 
1277                         reporter:label="Z39.50 Index Field Map">
1278         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1279             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1280             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1281             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1282             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1283             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1284             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1285         </fields>
1286         <links>
1287             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1288             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1289             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1290         </links>
1291         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1292             <actions>
1293                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1294                 <retrieve/>
1295                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1296                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1297             </actions>
1298         </permacrud>
1299     </class>
1300
1301
1302         <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">
1303                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1304                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1305                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1306                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1307                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1308                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1309                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1310                 </fields>
1311                 <links>
1312             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1313             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1314                 </links>
1315                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1316                         <actions>
1317                                 <retrieve/>
1318                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1319                         </actions>
1320                 </permacrud>
1321         </class>
1322
1323         <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">
1324                 <fields oils_persist:primary="key">
1325                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1326                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1327                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1328                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1329                 </fields>
1330                 <links/>
1331                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1332                         <actions>
1333                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1334                                 <retrieve/>
1335                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1336                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1337                         </actions>
1338                 </permacrud>
1339         </class>
1340
1341         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1342                 <fields oils_persist:primary="module">
1343                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1344                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1345                 </fields>
1346                 <links/>
1347         </class>
1348
1349         <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">
1350                 <fields oils_persist:primary="module">
1351                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1352                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1353                 </fields>
1354                 <links/>
1355                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1356                         <actions>
1357                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1358                                 <retrieve/>
1359                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1360                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1361                         </actions>
1362                 </permacrud>
1363         </class>
1364
1365         <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">
1366                 <fields oils_persist:primary="module">
1367                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1368                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1369                 </fields>
1370                 <links/>
1371                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1372                         <actions>
1373                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1374                                 <retrieve/>
1375                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1376                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1377                         </actions>
1378                 </permacrud>
1379         </class>
1380
1381         <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">
1382                 <fields oils_persist:primary="module">
1383                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1384                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1385                 </fields>
1386                 <links/>
1387                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1388                         <actions>
1389                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1390                                 <retrieve/>
1391                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1392                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1393                         </actions>
1394                 </permacrud>
1395         </class>
1396
1397         <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">
1398                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1399                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1400                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1401                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1402                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1403                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1404                 </fields>
1405                 <links>
1406                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1407                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1408                 </links>
1409                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1410                         <actions>
1411                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1412                     <context link="event_def" field="owner"/>
1413                 </create>
1414                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1415                     <context link="event_def" field="owner"/>
1416                 </retrieve>
1417                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1418                     <context link="event_def" field="owner"/>
1419                 </update>
1420                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1421                     <context link="event_def" field="owner"/>
1422                 </delete>
1423                         </actions>
1424                 </permacrud>
1425         </class>
1426
1427         <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">
1428                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1429                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1430                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1431                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1432                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1433                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1434                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1435                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1436                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1437                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1438                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1439                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1440                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1441                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1442                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1443                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1444                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1445                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1446                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1447                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1448                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1449                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1450                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1451                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1452                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1453                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1454                 </fields>
1455                 <links>
1456                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1457                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1458                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1459                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1460                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1461                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1462                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1463                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1464                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1465                 </links>
1466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1467                         <actions>
1468                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1469                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1470                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1471                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1472                         </actions>
1473                 </permacrud>
1474         </class>
1475
1476         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1477                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1478                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1479                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1480                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1481                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1482                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1483                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1484                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1485                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1486                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1487                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1488                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1489                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1490                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1491                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1492                 </fields>
1493                 <links>
1494                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1495                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1496                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1497                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1498                 </links>
1499         </class>
1500
1501         <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">
1502                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1503                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1504                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1505                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1506                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1507                 </fields>
1508                 <links>
1509                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1510                 </links>
1511                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1512                         <actions>
1513                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1514                     <context link="event_def" field="owner"/>
1515                 </create>
1516                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1517                     <context link="event_def" field="owner"/>
1518                 </retrieve>
1519                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1520                     <context link="event_def" field="owner"/>
1521                 </update>
1522                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1523                     <context link="event_def" field="owner"/>
1524                 </delete>
1525                         </actions>
1526                 </permacrud>
1527         </class>
1528
1529         <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">
1530                 <oils_persist:source_definition><![CDATA[
1531                 SELECT  atevdef.hook,
1532                         atevdef.name,
1533                         atevdef.reactor,
1534                         atev.id,
1535                         atev.event_def,
1536                         atev.add_time,
1537                         atev.run_time,
1538                         atev.start_time,
1539                         atev.update_time,
1540                         atev.complete_time,
1541                         atev.update_process,
1542                         atev.state,
1543                         atev.user_data,
1544                         atev.template_output,
1545                         atev.error_output,
1546                         atev.async_output,
1547                         targ_circ.id AS target_circ,
1548                         targ_ahr.id AS target_hold,
1549                         COALESCE(
1550                                 targ_circ.circ_lib,
1551                                 targ_ahr.pickup_lib
1552                         ) AS perm_lib
1553                 FROM action_trigger.event atev
1554                 JOIN action_trigger.event_definition atevdef ON
1555                         (atevdef.id = atev.event_def)
1556                 JOIN action_trigger.hook ath ON
1557                         (ath.key = atevdef.hook)
1558                 LEFT JOIN action.circulation targ_circ ON
1559                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1560                 LEFT JOIN action.hold_request targ_ahr ON
1561                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1562                 WHERE atev.add_time > NOW() - (SELECT MIN(value) FROM (
1563                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1564                                 'circ.staff.max_visible_event_age',
1565                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1566                         ) UNION
1567                         SELECT '1000 YEARS'::INTERVAL AS value
1568                 ) ous)
1569                 ]]></oils_persist:source_definition>
1570                 <fields oils_persist:primary="id">
1571                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1572                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1573                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1574                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1575                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1576                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1577                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1578                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1579                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1580                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1581                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1582                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1583                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1584                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1585                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1586                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1587                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1588                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1589                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1590                 </fields>
1591                 <links>
1592                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1593                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1594                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1595                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1596                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1597                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1598                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1599                 </links>
1600                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1601                         <actions>
1602                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1603                         </actions>
1604                 </permacrud>
1605         </class>
1606
1607         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1608                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1609                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1610                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1611                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1612                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1613                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1614                 </fields>
1615                 <links>
1616                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1617                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1618                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1619                 </links>
1620                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1621                         <actions>
1622                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1623                         </actions>
1624                 </permacrud>
1625         </class>
1626
1627         <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">
1628                 <fields oils_persist:primary="code">
1629                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1630                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1631                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1632                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1633                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1634                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1635                 </fields>
1636                 <links/>
1637         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1638             <actions>
1639                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1640                 <retrieve/>
1641                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1642                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1643             </actions>
1644         </permacrud>
1645         </class>
1646
1647         <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">
1648                 <fields oils_persist:primary="code">
1649                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1650                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1651                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1652                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1653                 </fields>
1654                 <links/>
1655         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1656             <actions>
1657                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1658                 <retrieve/>
1659                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1660                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1661             </actions>
1662         </permacrud>
1663         </class>
1664
1665         <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">
1666                 <fields oils_persist:primary="code">
1667                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1668                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1669                 </fields>
1670                 <links/>
1671         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1672             <actions>
1673                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1674                 <retrieve/>
1675                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1676                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1677             </actions>
1678         </permacrud>
1679         </class>
1680
1681         <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">
1682                 <fields oils_persist:primary="code">
1683                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1684                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1685                 </fields>
1686                 <links/>
1687         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1688             <actions>
1689                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1690                 <retrieve/>
1691                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1692                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1693             </actions>
1694         </permacrud>
1695         </class>
1696
1697         <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">
1698                 <fields oils_persist:primary="code">
1699                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1700                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1701                 </fields>
1702                 <links/>
1703         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1704             <actions>
1705                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1706                 <retrieve/>
1707                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1708                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1709             </actions>
1710         </permacrud>
1711         </class>
1712
1713         <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">
1714                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1715                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1716                         <field reporter:label="Name" name="name" 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_PTYPE" global_required="true"/>
1722                 <retrieve/>
1723                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1724                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1725             </actions>
1726         </permacrud>
1727         </class>
1728
1729         <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">
1730                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1731                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1732                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1733                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1734                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1735                 </fields>
1736         <links>
1737             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1738             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1739             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1740         </links>
1741         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1742             <actions>
1743                 <create permission="UPDATE_COPY">
1744                     <context link="target_copy" field="circ_lib"/>
1745                 </create>
1746                 <retrieve/>
1747                 <update permission="UPDATE_COPY">
1748                     <context link="target_copy" field="circ_lib"/>
1749                 </update>
1750                 <delete permission="UPDATE_COPY">
1751                     <context link="target_copy" field="circ_lib"/>
1752                 </delete>
1753             </actions>
1754         </permacrud>
1755         </class>
1756
1757         <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">
1758                 <fields oils_persist:primary="code">
1759                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1760                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1761                 </fields>
1762                 <links/>
1763         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1764             <actions>
1765                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1766                 <retrieve/>
1767                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1768                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1769             </actions>
1770         </permacrud>
1771         </class>
1772
1773         <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">
1774                 <fields oils_persist:primary="code">
1775                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1776                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1777                 </fields>
1778                 <links/>
1779         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1780             <actions>
1781                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1782                 <retrieve/>
1783                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1784                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1785             </actions>
1786         </permacrud>
1787         </class>
1788
1789         <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">
1790                 <fields oils_persist:primary="code">
1791                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1792                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1793                 </fields>
1794                 <links/>
1795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1796             <actions>
1797                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1798                 <retrieve/>
1799                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1800                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1801             </actions>
1802         </permacrud>
1803         </class>
1804
1805     <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">
1806         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1807             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1808             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1809             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1810             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1811             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1812             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1813             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1814             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1815             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1816             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1817             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1818             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1819             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1820             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1821             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1822             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1823             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1824         </fields>
1825         <links/>
1826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1827             <actions>
1828                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1829                 <retrieve/>
1830                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1831                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1832             </actions>
1833         </permacrud>
1834     </class>
1835
1836     <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">
1837         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1838             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1839             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1840             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1841             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1842             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1843             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1844             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1845             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1846             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1847             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1848             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1849             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1850             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1851             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1852             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1853             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1854             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1855             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1856             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1857         </fields>
1858         <links/>
1859         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1860             <actions>
1861                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1862                 <retrieve/>
1863                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1864                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1865             </actions>
1866         </permacrud>
1867     </class>
1868
1869     <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">
1870         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1871             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1872             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1873             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1874             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1875             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1876         </fields>
1877         <links>
1878             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1879             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1880             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1881         </links>
1882         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1883             <actions>
1884                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1885                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1886                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1887                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1888             </actions>
1889         </permacrud>
1890     </class>
1891
1892         <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">
1893                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1894                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1895                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1896                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1897                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1898                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1899                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1900                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1901                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1902                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1903                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1904                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1905                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1906                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1907                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1908                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1909                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1910             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1911                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1912                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1913                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1914                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1915                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1916                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1917                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1918                 </fields>
1919                 <links>
1920                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1921                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1922                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1923                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1924                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1925                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1926                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1927                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1928                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1929                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1930                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1931                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1932                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1933             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1934                 </links>
1935         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1936             <actions>
1937                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1938                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1939                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1940                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1941             </actions>
1942         </permacrud>
1943         </class>
1944
1945         <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">
1946                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1947                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1948                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1949                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1950                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1951                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1952                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1953                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1954                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1955                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1956                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1957                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1958                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1959                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1960                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1961                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1962             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1963                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1964                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1965             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1966                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1967                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1968                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1969                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1970             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1971             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1972             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1973                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1974                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1975                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1976                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1977                 </fields>
1978                 <links>
1979                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1980                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1981                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1982                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1983                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1984                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1985                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1986                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1987                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1988                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1989                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1990                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1991                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1992                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1993             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1994                 </links>
1995         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1996             <actions>
1997                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1998                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1999                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2000                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2001             </actions>
2002         </permacrud>
2003         </class>
2004
2005     <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">
2006         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
2007             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2008             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2009             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2010         </fields>
2011         <links/>
2012         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2013             <actions>
2014                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2015                 <retrieve/>
2016                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2017                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2018             </actions>
2019         </permacrud>
2020     </class>
2021
2022     <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">
2023         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
2024             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2025             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2026             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2027             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
2028             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
2029             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
2030             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2031         </fields>
2032         <links>
2033             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2034         </links>
2035         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2036             <actions>
2037                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2038                 <retrieve/>
2039                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2040                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2041             </actions>
2042         </permacrud>
2043     </class>
2044
2045     <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">
2046         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2047             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2048             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2049             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2050             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2051             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2052         </fields>
2053         <links>
2054             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2055             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2056         </links>
2057         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2058             <actions>
2059                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2060                     <context link="matchpoint" field="org_unit"/>
2061                 </create>
2062                 <retrieve/>
2063                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2064                     <context link="matchpoint" field="org_unit"/>
2065                 </update>
2066                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2067                     <context link="matchpoint" field="org_unit"/>
2068                 </delete>
2069             </actions>
2070         </permacrud>
2071     </class>
2072
2073     <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">
2074         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2075             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2076             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2077             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2078         </fields>
2079         <links>
2080             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2081             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2082         </links>
2083         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2084             <actions>
2085                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2086                     <context link="limit_set" field="owning_lib"/>
2087                 </create>
2088                 <retrieve/>
2089                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2090                     <context link="limit_set" field="owning_lib"/>
2091                 </update>
2092                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2093                     <context link="limit_set" field="owning_lib"/>
2094                 </delete>
2095             </actions>
2096         </permacrud>
2097     </class>
2098     <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">
2099         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2100             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2101             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2102             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2103         </fields>
2104         <links>
2105             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2106             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2107         </links>
2108         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2109             <actions>
2110                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2111                     <context link="limit_set" field="owning_lib"/>
2112                 </create>
2113                 <retrieve/>
2114                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2115                     <context link="limit_set" field="owning_lib"/>
2116                 </update>
2117                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2118                     <context link="limit_set" field="owning_lib"/>
2119                 </delete>
2120             </actions>
2121         </permacrud>
2122     </class>
2123
2124     <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">
2125         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2126             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2127             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2128             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2129             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2130         </fields>
2131         <links>
2132             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2133             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2134         </links>
2135         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2136             <actions>
2137                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2138                     <context link="limit_set" field="owning_lib"/>
2139                 </create>
2140                 <retrieve/>
2141                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2142                     <context link="limit_set" field="owning_lib"/>
2143                 </update>
2144                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2145                     <context link="limit_set" field="owning_lib"/>
2146                 </delete>
2147             </actions>
2148         </permacrud>
2149     </class>
2150
2151         <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">
2152                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2153                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2154                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2155                 </fields>
2156                 <links/>
2157         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2158             <actions>
2159                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2160                 <retrieve/>
2161                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2162                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2163             </actions>
2164         </permacrud>
2165         </class>
2166
2167         <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">
2168                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2169                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2170                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2171                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2172                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2173                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2174                 </fields>
2175                 <links>
2176                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2177                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2178                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2179                 </links>
2180         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2181             <actions>
2182                 <create permission="ADMIN_SURVEY">
2183                     <context link="survey" field="owner"/>
2184                 </create>
2185                 <retrieve/>
2186                 <update permission="ADMIN_SURVEY">
2187                     <context link="survey" field="owner"/>
2188                 </update>
2189                 <delete permission="ADMIN_SURVEY">
2190                     <context link="survey" field="owner"/>
2191                 </delete>
2192             </actions>
2193         </permacrud>
2194         </class>
2195         <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">
2196                 <fields oils_persist:primary="id" oils_persist:sequence="">
2197                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2198                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2199                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2200                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2201                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2202                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2203                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2204                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2205                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2206                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2207                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2208                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2209                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2210                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2211                 </fields>
2212                 <links>
2213                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2214                 </links>
2215                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2216                         <actions>
2217                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2218                                         <context link="usr" field="home_ou" />
2219                                 </retrieve>
2220                         </actions>
2221                 </permacrud>
2222         </class>
2223         <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">
2224                 <fields oils_persist:primary="id" oils_persist:sequence="">
2225                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2226                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2227                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2228                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2229                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2230                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2231                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2232                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2233                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2234                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2235                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2236                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2237                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2238                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2239                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2240                 </fields>
2241                 <links>
2242                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2243                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2244                 </links>
2245         </class>
2246         <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">
2247                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2248                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2249                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2250                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2251                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2252                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2253                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2254                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2255                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2256                 </fields>
2257                 <links>
2258                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2259                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2260                 </links>
2261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2262                         <actions> <!-- created magically, so no create action -->
2263                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2264                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2265                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2266                         </actions>
2267                 </permacrud>
2268         </class>
2269         <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)">
2270                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2271                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2272                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2273                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2274                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2275                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2276                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2277                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2278                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2279                 </fields>
2280                 <links>
2281                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2282                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2283                 </links>
2284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2285                         <actions> <!-- created magically, so no create action -->
2286                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2287                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2288                         </actions>
2289                 </permacrud>
2290         </class>
2291         <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">
2292                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2293                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2294                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2295                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2296                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2297                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2298                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2299                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2300                 </fields>
2301                 <links>
2302                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2303                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2304                 </links>
2305         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2306             <actions>
2307                 <create permission="UPDATE_USER" context_field="owner">
2308                     <context link="usr" field="home_ou"/>
2309                 </create>
2310                                 <!-- note: public notes are still accessible via API -->
2311                 <retrieve permission="UPDATE_USER">
2312                     <context link="usr" field="home_ou"/>
2313                                 </retrieve>
2314                 <update permission="UPDATE_USER">
2315                     <context link="usr" field="home_ou"/>
2316                                 </update>
2317                 <delete permission="UPDATE_USER">
2318                     <context link="usr" field="home_ou"/>
2319                                 </delete>
2320             </actions>
2321         </permacrud>
2322         </class>
2323         <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">
2324                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2325                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2326                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2327                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2328                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2329                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2330                 </fields>
2331                 <links>
2332                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2333                 </links>
2334         </class>
2335         <class id="aus" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2336                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2337                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2338                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2339                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2340                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2341                 </fields>
2342                 <links>
2343                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2344                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2345                 </links>
2346                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2347                         <actions>
2348                                 <retrieve permission="VIEW_USER">
2349                                         <context link="usr" field="home_ou" />
2350                                 </retrieve>
2351                         </actions>
2352                 </permacrud>
2353         </class>
2354         <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">
2355                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2356                         <field name="field" reporter:datatype="link"/>
2357                         <field name="id" reporter:datatype="id" />
2358                         <field name="source" reporter:datatype="link"/>
2359                         <field name="value" reporter:datatype="text"/>
2360                 </fields>
2361                 <links>
2362                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2363                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2364                 </links>
2365         </class>
2366         <class id="aihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
2367                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2368                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2369                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2370                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2371                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2372                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2373                 </fields>
2374                 <links>
2375                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2376                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2377                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2378                 </links>
2379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2380                         <actions>
2381                                 <retrieve/>
2382                         </actions>
2383                 </permacrud>
2384         </class>
2385         <class id="ancihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
2386                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2387                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2388                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2389                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2390                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2391                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2392                 </fields>
2393                 <links>
2394                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2395                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2396                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2397                 </links>
2398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2399                         <actions>
2400                                 <retrieve/>
2401                         </actions>
2402                 </permacrud>
2403         </class>
2404         <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">
2405                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2406                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2407                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2408                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2409                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2410                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2411                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2412                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2413                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2414                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2415                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2416                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2417                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2418                 </fields>
2419                 <links>
2420                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2421                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2422                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2423                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2424                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2425                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2426                 </links>
2427         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2428             <actions>
2429                 <create permission="TRANSIT_COPY" context_field="owner">
2430                     <context link="target_copy" field="circ_lib"/>
2431                 </create>
2432                 <retrieve/>
2433                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2434                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2435             </actions>
2436         </permacrud>
2437         </class>
2438         <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">
2439                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2440                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2441                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2442                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2443                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2444                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2445                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2446                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2447                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2448                 </fields>
2449                 <links>
2450                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2451                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2452                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2453                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2454                 </links>
2455         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2456             <actions>
2457                 <create permission="ADMIN_SURVEY">
2458                     <context link="survey" field="owner"/>
2459                 </create>
2460                 <retrieve permission="VIEW_USER">
2461                     <context link="usr" field="home_ou"/>
2462                 </retrieve>
2463                 <update permission="ADMIN_SURVEY">
2464                     <context link="survey" field="owner"/>
2465                 </update>
2466                 <delete permission="ADMIN_SURVEY">
2467                     <context link="survey" field="owner"/>
2468                 </delete>
2469             </actions>
2470         </permacrud>
2471         </class>
2472         <class id="ccbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2473                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2474                         <field name="bucket" />
2475                         <field name="id" reporter:datatype="id" />
2476                         <field name="target_copy" reporter:datatype="link"/>
2477                         <field name="create_time" reporter:datatype="timestamp" />
2478                         <field name="pos" reporter:datatype="int" />
2479                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2480                 </fields>
2481                 <links>
2482                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2483                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2484             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2485                 </links>
2486                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2487                         <actions>
2488                                 <retrieve permission="ADMIN_COPY_BUCKET">
2489                     <context link="bucket" owning_lib="owning_lib"/>
2490                 </retrieve>
2491             </actions>
2492         </permacrud>
2493         </class>
2494         <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">
2495                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2496                         <field name="id" reporter:datatype="id" />
2497                         <field name="item" reporter:datatype="link"/>
2498                         <field name="note" reporter:datatype="text" />
2499                 </fields>
2500                 <links>
2501                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2502                 </links>
2503         </class>
2504
2505         <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">
2506                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2507                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2508                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2509                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2510                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2511                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2512                 </fields>
2513                 <links>
2514                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2515                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2516                 </links>
2517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2518                         <actions>
2519                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2520                                 <retrieve/>
2521                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2522                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2523                         </actions>
2524                 </permacrud>
2525         </class>
2526
2527         <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">
2528                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2529                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2530                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2531                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2532                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2533                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2534                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2535                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2536                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2537                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2538                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2539                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2540                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2541                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2542                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2543                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2544                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2545                 </fields>
2546                 <links>
2547                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2548                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2549                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2550                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2551                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2552                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2553                         <link field="heading" reltype="has_a" key="id" map="" class="ahf"/>
2554                 </links>
2555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2556                         <actions>
2557                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2558                                 <retrieve/>
2559                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2560                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2561                         </actions>
2562                 </permacrud>
2563         </class>
2564
2565         <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">
2566                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2567                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2568                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2569                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2570                 </fields>
2571                 <links>
2572                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2573                 </links>
2574                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2575                         <actions>
2576                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2577                                 <retrieve/>
2578                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2579                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2580                         </actions>
2581                 </permacrud>
2582         </class>
2583
2584         <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">
2585                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2586                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2587                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2588                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2589                 </fields>
2590                 <links>
2591                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2592                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2593                 </links>
2594                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2595                         <actions>
2596                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2597                                 <retrieve/>
2598                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2599                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2600                         </actions>
2601                 </permacrud>
2602         </class>
2603
2604         <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">
2605                 <fields oils_persist:primary="code">
2606                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2607                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2608                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2609                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2610                         <field reporter:label="Short Code" name="short_code" reporter:datatype="text" />
2611                         <field reporter:label="URI" name="uri" reporter:datatype="text" />
2612                 </fields>
2613                 <links>
2614                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2615                 </links>
2616                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2617                         <actions>
2618                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2619                                 <retrieve/>
2620                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2621                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2622                         </actions>
2623                 </permacrud>
2624         </class>
2625
2626         <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">
2627                 <fields oils_persist:primary="code">
2628                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2629                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2630                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2631                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2632                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2633                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2634                 </fields>
2635                 <links>
2636                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2637                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2638                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2639                 </links>
2640                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2641                         <actions>
2642                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2643                                 <retrieve/>
2644                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2645                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2646                         </actions>
2647                 </permacrud>
2648         </class>
2649
2650     <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">
2651         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2652             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2653             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2654             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2655         </fields>
2656         <links>
2657             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2658             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2659         </links>
2660         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2661             <actions>
2662                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2663                 <retrieve/>
2664                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2665                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2666             </actions>
2667         </permacrud>
2668     </class>
2669
2670         <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">
2671                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2672                         <field name="active" reporter:datatype="bool"/>
2673                         <field name="create_date" reporter:datatype="timestamp"/>
2674                         <field name="creator" />
2675                         <field name="deleted" reporter:datatype="bool"/>
2676                         <field name="edit_date" reporter:datatype="timestamp"/>
2677                         <field name="editor" />
2678                         <field name="id" reporter:datatype="id" />
2679                         <field name="last_xact_id" />
2680                         <field name="marc" />
2681                         <field name="source" />
2682                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2683                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2684                         <field name="heading" />
2685                         <field name="simple_heading" />
2686                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2687                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2688                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2689                 </fields>
2690                 <links>
2691                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2692                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2693                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2694                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2695                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2696                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2697                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2698                 </links>
2699                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2700                         <actions>
2701                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2702                                 <retrieve/>
2703                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2704                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2705                         </actions>
2706                 </permacrud>
2707         </class>
2708         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2709                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2710                         <field name="char_encoding" />
2711                         <field name="id" />
2712                         <field name="record" />
2713                         <field name="record_status" />
2714                         <field name="thesaurus" />
2715                 </fields>
2716                 <links>
2717                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2718                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2719                 </links>
2720         </class>
2721         <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">
2722                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2723                         <field name="id" reporter:datatype="id" />
2724                         <field name="bib" reporter:datatype="link" />
2725                         <field name="authority" reporter:datatype="link" />
2726                 </fields>
2727                 <links>
2728                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2729                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2730                 </links>
2731         </class>
2732         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2733                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2734                         <field name="id" reporter:datatype="id" />
2735                         <field name="record" reporter:datatype="link" />
2736                         <field name="atag" reporter:datatype="link" />
2737                         <field name="value" reporter:datatype="text" />
2738                 </fields>
2739                 <links>
2740                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2741                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2742                 </links>
2743         </class>
2744
2745         <class id="ahf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::heading_field" oils_persist:tablename="authority.heading_field" reporter:label="Authority Heading Fields">
2746                 <fields oils_persist:primary="id" oils_persist:sequence="authority.heading_fields_id_seq">
2747                         <field name="id" reporter:datatype="id" />
2748                         <field name="heading_type" reporter:datatype="text" reporter:label="Heading Type" />
2749                         <field name="heading_purpose" reporter:datatype="text" reporter:label="Heading Purpose" />
2750                         <field name="label" reporter:datatype="text" reporter:label="Heading Field Label" />
2751                         <field name="format" reporter:datatype="text" reporter:label="Heading XSLT Format" />
2752                         <field name="heading_xpath" reporter:datatype="text" reporter:label="Heading XPath" />
2753                         <field name="component_xpath" reporter:datatype="text" reporter:label="Heading Component XPath" />
2754                         <field name="type_xpath" reporter:datatype="text" reporter:label="Related/Variant Type XPath" />
2755                         <field name="thesaurus_xpath" reporter:datatype="text" reporter:label="Thesaurus XPath" />
2756                         <field name="thesaurus_override_xpath" reporter:datatype="text" reporter:label="Thesaurus Override XPath" />
2757                         <field name="joiner" reporter:datatype="text" reporter:label="Joiner string" />
2758                 </fields>
2759                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2760                         <actions>
2761                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2762                                 <retrieve/>
2763                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2764                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2765                         </actions>
2766                 </permacrud>
2767         </class>
2768
2769         <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">
2770                 <fields oils_persist:primary="code" oils_persist:sequence="">
2771                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2772                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2773                 </fields>
2774                 <links/>
2775         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2776             <actions>
2777                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2778                 <retrieve/>
2779                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2780                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2781             </actions>
2782         </permacrud>
2783         </class>
2784         <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">
2785                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2786                         <field name="accepting_usr" />
2787                         <field name="amount" reporter:datatype="money" />
2788                         <field name="amount_collected" reporter:datatype="money" />
2789                         <field name="approval_code" reporter:datatype="text"/>
2790                         <field name="cash_drawer" reporter:datatype="link"/>
2791                         <field name="cc_number" reporter:datatype="text"/>
2792                         <field name="cc_order_number" reporter:datatype="text"/>
2793                         <field name="cc_processor" reporter:datatype="text"/>
2794                         <field name="id" reporter:datatype="id" />
2795                         <field name="note" reporter:datatype="text"/>
2796                         <field name="payment_ts" reporter:datatype="timestamp"/>
2797                         <field name="xact" reporter:datatype="link"/>
2798                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2799                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2800                 </fields>
2801                 <links>
2802                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2803                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2804                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2805                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2806                 </links>
2807         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2808             <actions>
2809                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2810                     <context link="xact" jump="usr" field="home_ou"/>
2811                 </retrieve>
2812                         </actions>
2813                 </permacrud>
2814         </class>
2815         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition" oils_persist:field_safe="true">
2816                 <fields oils_persist:primary="name">
2817                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2818                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2819                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2820                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2821                 </fields>
2822                 <links/>
2823         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2824             <actions>
2825                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2826                 <retrieve/>
2827                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2828                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2829             </actions>
2830         </permacrud>
2831         </class>
2832
2833         <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">
2834                 <fields oils_persist:primary="alias">
2835                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2836                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2837                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2838                 </fields>
2839                 <links>
2840                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2841                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2842                 </links>
2843         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2844             <actions>
2845                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2846                 <retrieve/>
2847                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2848                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2849             </actions>
2850         </permacrud>
2851         </class>
2852
2853         <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">
2854                 <fields oils_persist:primary="name">
2855                         <field reporter:label="Name" name="name" reporter:datatype="text" reporter:selector="label"/>
2856                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2857                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2858                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2859                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2860                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2861                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2862                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2863                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2864                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2865                 </fields>
2866                 <links>
2867                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2868                 </links>
2869         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2870             <actions>
2871                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2872                 <retrieve/>
2873                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2874                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2875             </actions>
2876         </permacrud>
2877         </class>
2878
2879         <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">
2880                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2881                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2882                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2883                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2884                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2885                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2886                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2887                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
2888                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2889                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2890                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2891                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2892                         <field reporter:label="Display Field?" name="display_field" reporter:datatype="bool" />
2893                         <field reporter:label="Display XPath" name="display_xpath" reporter:datatype="text" />
2894                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2895                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2896                         <field reporter:label="Browse Sort XPath" name="browse_sort_xpath" reporter:datatype="text" />
2897                         <field reporter:label="Authority XPath" name="authority_xpath" reporter:datatype="text" />
2898                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2899                         <field reporter:label="Display Field Map" name="display_field_map" oils_persist:virtual="true" reporter:datatype="link"/>
2900                         <field reporter:label="Virtual Field Data Suppliers" name="data_sources" oils_persist:virtual="true" reporter:datatype="link"/>
2901                 </fields>
2902                 <links>
2903                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
2904                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2905                         <link field="display_field_map" reltype="might_have" key="field" map="" class="cdfm"/>
2906                         <link field="data_sources" reltype="has_many" key="virtual" map="" class="cmfvm"/>
2907                 </links>
2908         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2909             <actions>
2910                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2911                 <retrieve/>
2912                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2913                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2914             </actions>
2915         </permacrud>
2916         </class>
2917
2918         <class id="cmfvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_virtual_map" oils_persist:tablename="config.metabib_field_virtual_map" reporter:label="Metabib Field Virtual Map" oils_persist:field_safe="true">
2919                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_virtual_map_id_seq">
2920                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2921                         <field reporter:label="Real" name="real" reporter:datatype="link"/>
2922                         <field reporter:label="Virtual" name="virtual" reporter:datatype="link"/>
2923                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
2924                 </fields>
2925                 <links>
2926                         <link field="real" reltype="has_a" key="id" map="" class="cmf"/>
2927                         <link field="virtual" reltype="has_a" key="id" map="" class="cmf"/>
2928                 </links>
2929         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2930             <actions>
2931                 <create permission="CREATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2932                 <retrieve/>
2933                 <update permission="UPDATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2934                 <delete permission="DELETE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2935             </actions>
2936         </permacrud>
2937         </class>
2938
2939         <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">
2940                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2941                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2942                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2943                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2944                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2945                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2946                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2947                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2948                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2949                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2950                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2951                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2952                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2953                 </fields>
2954                 <links>
2955                 </links>
2956                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2957                         <actions>
2958                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2959                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2960                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2961                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2962                         </actions>
2963                 </permacrud>
2964         </class>
2965         <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">
2966                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2967                         <field name="id" reporter:datatype="id" />
2968                         <field name="name" reporter:datatype="text"/>
2969                         <field name="xpath" reporter:datatype="text"/>
2970                         <field name="format" reporter:datatype="link"/>
2971                         <field name="first_word" reporter:datatype="bool" />
2972                 </fields>
2973                 <links/>
2974         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2975             <actions>
2976                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2977                 <retrieve/>
2978                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2979                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2980             </actions>
2981         </permacrud>
2982         </class>
2983         <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">
2984                 <fields oils_persist:primary="code" oils_persist:sequence="">
2985                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2986                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2987                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2988                 </fields>
2989                 <links/>
2990         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2991             <actions>
2992                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2993                 <retrieve/>
2994                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2995                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2996             </actions>
2997         </permacrud>
2998         </class>
2999         <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">
3000                 <fields oils_persist:primary="code" oils_persist:sequence="">
3001                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3002                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3003                 </fields>
3004                 <links/>
3005         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3006             <actions>
3007                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3008                 <retrieve/>
3009                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3010                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3011             </actions>
3012         </permacrud>
3013         </class>
3014     <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">
3015         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
3016             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
3017             <field reporter:label="Name" name="name" reporter:datatype="text"/>
3018             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
3019             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
3020         </fields>
3021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3022             <actions>
3023                 <retrieve/>
3024             </actions>
3025         </permacrud>
3026     </class>
3027         <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">
3028                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
3029                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3030                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3031                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3032                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3033                 </fields>
3034                 <links>
3035                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3036                 </links>
3037         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3038             <actions>
3039                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3040                 <retrieve/>
3041                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3042                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
3043             </actions>
3044         </permacrud>
3045         </class>
3046         <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">
3047                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
3048                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3049                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3050                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3051                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3052                 </fields>
3053                 <links>
3054                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3055                 </links>
3056         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3057             <actions>
3058                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
3059                 <retrieve/>
3060                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
3061                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
3062             </actions>
3063         </permacrud>
3064         </class>
3065         <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">
3066                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
3067                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3068                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
3069                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3070                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3071                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3072                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3073                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
3074                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
3075                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3076                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3077                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3078                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3079                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
3080                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
3081                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3082                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3083                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3084                 </fields>
3085                 <links>
3086                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3087                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3088                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3089                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3090                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3091                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3092                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3093                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3094                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3095                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3096                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3097                 </links>
3098         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3099             <actions>
3100                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3101                 <retrieve/>
3102                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3103                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3104             </actions>
3105         </permacrud>
3106         </class>
3107         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3108                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3109                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3110                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3111                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3112                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3113                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3114                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3115                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3116                 </fields>
3117                 <links>
3118                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3119                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3120         </links>
3121         </class>
3122         <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">
3123                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3124                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3125                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3126                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3127                 </fields>
3128                 <links>
3129                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3130                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3131                 </links>
3132         </class>
3133         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3134                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3135                         <field name="id" reporter:datatype="id" />
3136                         <field name="value" oils_persist:i18n="true" />
3137                 </fields>
3138                 <links/>
3139         </class>
3140         <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">
3141                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3142                         <field name="balance_owed" reporter:datatype="money" />
3143                         <field name="total_owed" reporter:datatype="money" />
3144                         <field name="total_paid" reporter:datatype="money" />
3145                         <field name="usr" reporter:datatype="link"/>
3146                 </fields>
3147                 <links>
3148                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3149         </links>
3150         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3151             <actions>
3152                 <retrieve permission="VIEW_USER">
3153                     <context link="usr" field="home_ou"/>
3154                 </retrieve>
3155             </actions>
3156         </permacrud>
3157         </class>
3158         <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">
3159                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3160                         <field name="collector" />
3161                         <field name="enter_time" reporter:datatype="timestamp"/>
3162                         <field name="id" reporter:datatype="id" />
3163                         <field name="location" reporter:datatype="link"/>
3164                         <field name="usr" reporter:datatype="link"/>
3165                 </fields>
3166                 <links>
3167                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3168                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3169                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3170                 </links>
3171         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3172             <actions>
3173                 <create permission="money.collections_tracker.create" context_field="location"/>
3174                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3175                 <delete permission="money.collections_tracker.create" context_field="location"/>
3176             </actions>
3177         </permacrud>
3178         </class>
3179         <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">
3180                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3181                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3182                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3183                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3184                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3185                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3186                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3187                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3188                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3189                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3190                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3191                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3192                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3193                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3194                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3195                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3196                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3197                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3198                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3199                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3200                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3201                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3202                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3203                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3204                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3205                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3206                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3207                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3208                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3209                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3210                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3211                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3212                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3213                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3214                         <field reporter:label="Display Fields" name="display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3215                         <field reporter:label="Flat Display Entries" name="flat_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3216                         <field reporter:label="Compressed Display Entries" name="compressed_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3217                         <field reporter:label="Wide Display Entries" name="wide_display_entry" oils_persist:virtual="true" reporter:datatype="link"/>
3218                         <field reporter:label="Merge Date" name="merge_date" reporter:datatype="timestamp"/>
3219                         <field reporter:label="Merged To" name="merged_to" reporter:datatype="link"/>
3220                 </fields>
3221                 <links>
3222                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3223                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3224                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3225                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3226                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3227                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3228                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3229                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3230                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3231                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3232                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3233                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3234                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3235                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3236                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3237                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3238                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3239                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3240                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3241                         <link field="mattrs" reltype="has_many" key="id" map="" class="mraf"/>
3242                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3243                         <link field="display_entries" reltype="has_many" key="source" map="" class="mde"/>
3244                         <link field="flat_display_entries" reltype="has_many" key="source" map="" class="mfde"/>
3245                         <link field="compressed_display_entries" reltype="has_many" key="source" map="" class="mcde"/>
3246                         <link field="wide_display_entry" reltype="might_have" key="source" map="" class="mwde"/>
3247                         <link field="merged_to" reltype="has_a" key="id" map="" class="bre"/>
3248                 </links>
3249         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3250             <actions>
3251                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3252                 <retrieve/>
3253                 <update permission="UPDATE_MARC" global_required="true"/>
3254                 <!-- 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. -->
3255                 <delete permission="DELETE_RECORD" global_required="true"/>
3256             </actions>
3257         </permacrud>
3258         </class>
3259         <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">
3260                 <fields oils_persist:primary="id">
3261                         <field name="dow_0_close" />
3262                         <field name="dow_0_open" />
3263                         <field name="dow_1_close" />
3264                         <field name="dow_1_open" />
3265                         <field name="dow_2_close" />
3266                         <field name="dow_2_open" />
3267                         <field name="dow_3_close" />
3268                         <field name="dow_3_open" />
3269                         <field name="dow_4_close" />
3270                         <field name="dow_4_open" />
3271                         <field name="dow_5_close" />
3272                         <field name="dow_5_open" />
3273                         <field name="dow_6_close" />
3274                         <field name="dow_6_open" />
3275                         <field name="id" reporter:datatype="id" />
3276                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3277                 </fields>
3278                 <links>
3279                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3280                 </links>
3281         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3282             <actions>
3283                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3284                 <retrieve/>
3285                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3286                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3287             </actions>
3288         </permacrud>
3289         </class>
3290         <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">
3291                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3292                         <field name="id" reporter:datatype="id" />
3293                         <field name="record" reporter:datatype="link"/>
3294                         <field name="label" reporter:datatype="text"/>
3295                         <field name="label_sortkey" reporter:datatype="text"/>
3296                         <field name="deleted" reporter:datatype="bool"/>
3297                 </fields>
3298                 <links>
3299                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3300                 </links>
3301         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3302             <actions>
3303                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3304                 <retrieve/>
3305                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3306                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3307             </actions>
3308         </permacrud>
3309         </class>
3310         <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">
3311                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3312                         <field name="id" reporter:datatype="id" />
3313                         <field name="target_copy" reporter:datatype="link" />
3314                         <field name="part" reporter:datatype="link"/>
3315                 </fields>
3316                 <links>
3317                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3318                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3319                 </links>
3320         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3321             <actions>
3322                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3323                 <retrieve/>
3324                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3325                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3326             </actions>
3327         </permacrud>
3328         </class>
3329     <class  id="aecc"
3330             controller="open-ils.cstore open-ils.pcrud"
3331             oils_obj:fieldmapper="action::emergency_closing_circulation"
3332             oils_persist:tablename="action.emergency_closing_circulation"
3333             reporter:label="Emergency Closing Circulation Entry"
3334             oils_persist:readonly="true"
3335     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3336         <fields oils_persist:primary="id">
3337             <field name="id" reporter:datatype="id" />
3338             <field name="circulation" reporter:datatype="link" />
3339                         <field name="emergency_closing" reporter:datatype="link"/>
3340             <field name="original_due_date" reporter:datatype="timestamp" />
3341             <field name="process_time" reporter:datatype="timestamp" />
3342         </fields>
3343         <links>
3344             <link field="circulation" reltype="has_a" key="id" map="" class="circ"/>
3345             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3346         </links>
3347         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3348             <actions>
3349                 <retrieve/>
3350             </actions>
3351         </permacrud>
3352     </class>
3353     <class  id="aecr"
3354             controller="open-ils.cstore open-ils.pcrud"
3355             oils_obj:fieldmapper="action::emergency_closing_reservation"
3356             oils_persist:tablename="action.emergency_closing_reservation"
3357             reporter:label="Emergency Closing Reservation Entry"
3358             oils_persist:readonly="true"
3359     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3360         <fields oils_persist:primary="id">
3361             <field name="id" reporter:datatype="id" />
3362             <field name="reservation" reporter:datatype="link" />
3363                         <field name="emergency_closing" reporter:datatype="link"/>
3364             <field name="original_end_time" reporter:datatype="timestamp" />
3365             <field name="process_time" reporter:datatype="timestamp" />
3366         </fields>
3367         <links>
3368             <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3369             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3370         </links>
3371         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3372             <actions>
3373                 <retrieve/>
3374             </actions>
3375         </permacrud>
3376     </class>
3377     <class  id="aech"
3378             controller="open-ils.cstore open-ils.pcrud"
3379             oils_obj:fieldmapper="action::emergency_closing_hold"
3380             oils_persist:tablename="action.emergency_closing_hold"
3381             reporter:label="Emergency Closing Hold Entry"
3382             oils_persist:readonly="true"
3383     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3384         <fields oils_persist:primary="id">
3385             <field name="id" reporter:datatype="id" />
3386             <field name="hold" reporter:datatype="link" />
3387                         <field name="emergency_closing" reporter:datatype="link"/>
3388             <field name="original_shelf_expire_time" reporter:datatype="timestamp" />
3389             <field name="process_time" reporter:datatype="timestamp" />
3390         </fields>
3391         <links>
3392             <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3393             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3394         </links>
3395         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3396             <actions>
3397                 <retrieve/>
3398             </actions>
3399         </permacrud>
3400     </class>
3401     <class  id="aecs"
3402             controller="open-ils.cstore open-ils.pcrud"
3403             oils_obj:fieldmapper="action::emergency_closing_status"
3404             oils_persist:tablename="action.emergency_closing_status"
3405             reporter:label="Emergency Closing Status"
3406             oils_persist:readonly="true"
3407     >
3408         <fields oils_persist:primary="id">
3409             <field name="id" reporter:datatype="id" />
3410             <field name="creator" reporter:datatype="link" />
3411             <field name="create_time" reporter:datatype="timestamp" />
3412             <field name="process_start_time" reporter:datatype="timestamp" />
3413             <field name="process_end_time" reporter:datatype="timestamp" />
3414             <field name="last_update_time" reporter:datatype="timestamp" />
3415             <field name="circulations" reporter:datatype="int" />
3416             <field name="circulations_complete" reporter:datatype="int" />
3417             <field name="reservations" reporter:datatype="int" />
3418             <field name="reservations_complete" reporter:datatype="int" />
3419             <field name="holds" reporter:datatype="int" />
3420             <field name="holds_complete" reporter:datatype="int" />
3421         </fields>
3422         <links>
3423             <link field="id" reltype="has_a" key="id" map="" class="aec"/>
3424         </links>
3425         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3426             <actions>
3427                 <retrieve/>
3428             </actions>
3429         </permacrud>
3430     </class>
3431     <class id="aec" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::emergency_closing" oils_persist:tablename="action.emergency_closing" reporter:label="Emergency Closing">
3432         <fields oils_persist:primary="id" oils_persist:sequence="action.emergency_closing_id_seq">
3433             <field name="id" reporter:datatype="id" />
3434             <field name="creator" reporter:datatype="link" />
3435             <field name="create_time" reporter:datatype="timestamp" />
3436             <field name="process_start_time" reporter:datatype="timestamp" />
3437             <field name="process_end_time" reporter:datatype="timestamp" />
3438             <field name="last_update_time" reporter:datatype="timestamp" />
3439             <field name="closing" oils_persist:virtual="true" reporter:datatype="link"/>
3440             <field name="status" oils_persist:virtual="true" reporter:datatype="link"/>
3441             <field name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3442             <field name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3443             <field name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3444         </fields>
3445         <links>
3446             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3447             <link field="closing" reltype="might_have" key="emergency_closing" map="" class="aoucd"/>
3448             <link field="status" reltype="might_have" key="id" map="" class="aecs"/>
3449             <link field="circulations" reltype="has_many" key="emergency_closing" map="" class="aecc"/>
3450             <link field="reservations" reltype="has_many" key="emergency_closing" map="" class="aecr"/>
3451             <link field="holds" reltype="has_many" key="emergency_closing" map="" class="aech"/>
3452         </links>
3453         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3454             <actions>
3455                 <create permission="EMERGENCY_CLOSING">
3456                     <context link="closing" field="org_unit" />
3457                 </create>
3458                 <retrieve/>
3459                 <update permission="EMERGENCY_CLOSING">
3460                     <context link="closing" field="org_unit" />
3461                 </update>
3462                 <delete permission="EMERGENCY_CLOSING">
3463                     <context link="closing" field="org_unit" />
3464                 </delete>
3465             </actions>
3466         </permacrud>
3467     </class>
3468         <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">
3469                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3470                         <field name="close_end" reporter:datatype="timestamp" />
3471                         <field name="close_start" reporter:datatype="timestamp" />
3472                         <field name="id" reporter:datatype="id" />
3473                         <field name="org_unit" reporter:datatype="org_unit"/>
3474                         <field name="reason" reporter:datatype="text"/>
3475                         <field name="full_day" reporter:datatype="bool"/>
3476                         <field name="multi_day" reporter:datatype="bool"/>
3477                         <field name="emergency_closing" reporter:datatype="link"/>
3478                 </fields>
3479                 <links>
3480                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3481                         <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3482                 </links>
3483         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3484             <actions>
3485                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3486                 <retrieve/>
3487                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3488                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3489             </actions>
3490         </permacrud>
3491         </class>
3492         <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">
3493                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3494                         <field name="extended" reporter:datatype="interval"/>
3495                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3496                         <field name="max_renewals" reporter:datatype="int" />
3497                         <field name="name" reporter:datatype="text"/>
3498                         <field name="normal" reporter:datatype="interval"/>
3499                         <field name="shrt" reporter:datatype="interval"/>
3500                         <field name="max_auto_renewals" reporter:datatype="int" />
3501                 </fields>
3502                 <links>
3503                 </links>
3504         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3505             <actions>
3506                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3507                 <retrieve/>
3508                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3509                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3510             </actions>
3511         </permacrud>
3512         </class>
3513
3514         <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">
3515                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3516                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3517                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3518             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3519                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3520             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3521                 </fields>
3522                 <links>
3523             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3524                 </links>
3525                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3526             <actions>
3527                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3528                 <retrieve/>
3529                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3530                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3531             </actions>
3532                 </permacrud>
3533         </class>
3534
3535         <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">
3536                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3537                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3538                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3539                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3540             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3541                 </fields>
3542                 <links>
3543                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3544                 </links>
3545                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3546             <actions>
3547                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3548                 <retrieve/>
3549                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3550                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3551             </actions>
3552                 </permacrud>
3553         </class>
3554
3555         <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">
3556                 <fields oils_persist:primary="id" oils_persist:sequence="">
3557                         <field name="balance_owed" reporter:datatype="money"/>
3558                         <field name="id" reporter:datatype="id" />
3559                         <field name="last_billing_note" reporter:datatype="text"/>
3560                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3561                         <field name="last_billing_type" reporter:datatype="text"/>
3562                         <field name="last_payment_note" reporter:datatype="text"/>
3563                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3564                         <field name="last_payment_type" reporter:datatype="text"/>
3565                         <field name="total_owed" reporter:datatype="money"/>
3566                         <field name="total_paid" reporter:datatype="money"/>
3567                         <field name="usr" reporter:datatype="link"/>
3568                         <field name="xact_finish" reporter:datatype="timestamp" />
3569                         <field name="xact_start" reporter:datatype="timestamp" />
3570                         <field name="xact_type" reporter:datatype="text"/>
3571                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3572                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3573                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3574                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3575                         <field name="billing_location" reporter:datatype="link"/>
3576                 </fields>
3577                 <links>
3578                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3579                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3580                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3581                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3582                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3583                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3584                 </links>
3585                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3586                         <actions>
3587                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3588                                         <context link="usr" field="home_ou" />
3589                                 </retrieve>
3590                         </actions>
3591                 </permacrud>
3592         </class>
3593         <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">
3594                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3595                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3596                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3597                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3598                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3599                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3600                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3601                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3602                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3603                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3604                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3605                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3606                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3607                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3608                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3609                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3610                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3611                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3612                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3613                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3614                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3615                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3616                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3617                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3618                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3619                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3620                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3621                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3622                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3623                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3624                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3625                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3626                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3627                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3628                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3629                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3630                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3631                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3632                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3633                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3634                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3635                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3636                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3637                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3638                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3639                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3640                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3641                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3642                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3643                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3644                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3645                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3646                         <field reporter:label="Preferred Prefix" name="pref_prefix" reporter:datatype="text"/>
3647                         <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
3648                         <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
3649                         <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
3650                         <field reporter:label="Preferred Suffix" name="pref_suffix" reporter:datatype="text"/>
3651                         <field reporter:label="Name Keywords" name="name_keywords" reporter:datatype="text"/>
3652                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3653                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3654                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3655                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3656                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3657                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3658                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3659                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3660                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3661                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3662                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3663                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3664                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3665                 </fields>
3666                 <links>
3667                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3668                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3669                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3670                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3671                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3672                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3673                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3674                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3675                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3676                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3677                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3678                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3679                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3680                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3681                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3682                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3683                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3684                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3685                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3686                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3687                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3688                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3689                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3690                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3691                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3692                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3693                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3694                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3695                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3696                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3697                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3698                 </links>
3699                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3700                         <actions>
3701                                 <retrieve permission="VIEW_USER user_request.view" context_field="home_ou" />
3702                         </actions>
3703                 </permacrud>
3704         </class>
3705         <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">
3706                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3707                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3708                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3709                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3710                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3711                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3712                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3713                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3714                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3715         </fields>
3716                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3717                         <actions>
3718                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3719                                 <retrieve/>
3720                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3721                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3722                         </actions>
3723                 </permacrud>
3724         </class>
3725         <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">
3726                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3727                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3728                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3729                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3730                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3731         </fields>
3732         <links>
3733                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3734                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3735                 </links>
3736                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3737                         <actions>
3738                                 <retrieve permission="RUN_REPORTS">
3739                                         <context link="usr" field="home_ou" />
3740                                 </retrieve>
3741                         </actions>
3742                 </permacrud>
3743         </class>
3744         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3745                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3746                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3747                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3748                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3749                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3750                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3751                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3752         </fields>
3753         <links>
3754                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3755                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3756                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3757                 </links>
3758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3759                         <actions>
3760                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3761                                         <context link="usr" field="home_ou" />
3762                                         <context link="ws" field="owning_lib" />
3763                                 </retrieve>
3764                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3765                                         <context link="usr" field="home_ou" />
3766                                         <context link="ws" field="owning_lib" />
3767                                 </create>
3768                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3769                                         <context link="usr" field="home_ou" />
3770                                         <context link="ws" field="owning_lib" />
3771                                 </update>
3772                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3773                                         <context link="usr" field="home_ou" />
3774                                         <context link="ws" field="owning_lib" />
3775                                 </delete>
3776                         </actions>
3777                 </permacrud>
3778         </class>
3779         <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">
3780                 <fields oils_persist:primary="name">
3781                         <field name="name" reporter:datatype="text"/>
3782                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3783                 </fields>
3784                 <links/>
3785                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3786                         <actions>
3787                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3788                                 <retrieve/>
3789                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3790                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3791                         </actions>
3792                 </permacrud>
3793         </class>
3794         <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">
3795                 <fields oils_persist:primary="name">
3796                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3797                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3798                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3799                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3800                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3801                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3802                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3803                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3804                 </fields>
3805                 <links>
3806                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3807                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3808                 </links>
3809                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3810                         <actions>
3811                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3812                                 <retrieve/>
3813                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3814                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3815                         </actions>
3816                 </permacrud>
3817         </class>
3818         <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">
3819                 <fields oils_persist:primary="name">
3820                         <field name="name" reporter:datatype="text"/>
3821                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3822                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3823                         <field name="datatype" reporter:datatype="text"/>
3824                         <field name="view_perm" reporter:datatype="link"/>
3825                         <field name="update_perm" reporter:datatype="link"/>
3826                         <field name="fm_class" reporter:datatype="text"/>
3827                         <field name="grp" reporter:datatype="link"/>
3828                 </fields>
3829                 <links>
3830                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3831                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3832                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3833                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3834                 </links>
3835                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3836                         <actions>
3837                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3838                                 <retrieve/>
3839                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3840                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3841                         </actions>
3842                 </permacrud>
3843         </class>
3844         <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">
3845                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3846                         <field name="id" />
3847                         <field name="name"  reporter:datatype="text"/>
3848                         <field name="org_unit" reporter:datatype="org_unit"/>
3849                         <field name="value"  reporter:datatype="text"/>
3850                 </fields>
3851                 <links>
3852                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3853                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3854                 </links>
3855         </class>
3856         <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">
3857                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3858                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3859                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3860                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3861                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3862                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3863                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3864                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3865                 </fields>
3866                 <links>
3867                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3868                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3869                 </links>
3870         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3871             <actions>
3872                 <create permission="CREATE_COPY_NOTE">
3873                     <context link="owning_copy" field="circ_lib"/>
3874                 </create>
3875                 <retrieve permission="VIEW_COPY_NOTES">
3876                     <context link="owning_copy" field="circ_lib"/>
3877                 </retrieve>
3878                 <update permission="UPDATE_COPY_NOTE">
3879                     <context link="owning_copy" field="circ_lib"/>
3880                 </update>
3881                 <delete permission="DELETE_COPY_NOTE">
3882                     <context link="owning_copy" field="circ_lib"/>
3883                 </delete>
3884             </actions>
3885         </permacrud>
3886         </class>
3887         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3888                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3889                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3890                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3891                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3892                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3893                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3894                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3895                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3896                 </fields>
3897                 <links>
3898                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3899                 </links>
3900         </class>
3901         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3902                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3903                         <field name="fingerprint"  reporter:datatype="text"/>
3904                         <field name="id" reporter:datatype="id" />
3905                         <field name="master_record" reporter:datatype="link"/>
3906                         <field name="mods"  reporter:datatype="text"/>
3907                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3908                 </fields>
3909                 <links>
3910                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3911                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3912                 </links>
3913         </class>
3914         <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">
3915                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3916                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3917                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3918                 </fields>
3919                 <links/>
3920         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3921             <actions>
3922                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3923                 <retrieve/>
3924                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3925                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3926             </actions>
3927         </permacrud>
3928         </class>
3929         <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">
3930                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3931                         <field name="code"  reporter:datatype="text"/>
3932                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3933                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3934                 </fields>
3935                 <links/>
3936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3937             <actions>
3938                 <create permission="CREATE_PERM" global_required="true"/>
3939                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3940                 <update permission="UPDATE_PERM" global_required="true"/>
3941                 <delete permission="DELETE_PERM" global_required="true"/>
3942             </actions>
3943         </permacrud>
3944         </class>
3945         <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">
3946                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3947                         <field name="id" reporter:datatype="id" />
3948                         <field name="metarecord" reporter:datatype="link"/>
3949                         <field name="source" reporter:datatype="link"/>
3950                 </fields>
3951                 <links>
3952                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3953                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3954                 </links>
3955         </class>
3956         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
3957                         oils_obj:fieldmapper="metabib::display_entry" 
3958                         oils_persist:tablename="metabib.display_entry" 
3959                         oils_persist:field_safe="true"
3960                         reporter:label="Display Field Entry" oils_persist:readonly="true">
3961                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
3962                         <field name="id" reporter:datatype="id" />
3963                         <field name="field" reporter:datatype="link"/>
3964                         <field name="source" reporter:datatype="link"/>
3965                         <field name="value"  reporter:datatype="text"/>
3966                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
3967                 </fields>
3968                 <links>
3969                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3970                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3971                 </links>
3972                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3973                         <actions>
3974                                 <retrieve/>
3975                         </actions>
3976                 </permacrud>
3977         </class>
3978         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
3979                 oils_persist:tablename="metabib.flat_display_entry"
3980                 oils_obj:fieldmapper="metabib::flat_display_entry" 
3981                 oils_persist:field_safe="true"
3982                 reporter:label="Flat Display Entry" 
3983                 oils_persist:readonly="true">
3984                 <fields>
3985                         <field name="source" reporter:datatype="id" />
3986                         <field name="name" reporter:datatype="text"/>
3987                         <field name="multi" reporter:datatype="bool"/>
3988                         <field name="label" reporter:datatype="text"/>
3989                         <field name="field" reporter:datatype="link"/>
3990                         <field name="value" reporter:datatype="text"/>
3991                 </fields>
3992                 <links>
3993                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3994                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3995                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
3996                 </links>
3997                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3998                         <actions>
3999                                 <retrieve/>
4000                         </actions>
4001                 </permacrud>
4002         </class>
4003         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
4004                 oils_persist:tablename="metabib.compressed_display_entry"
4005                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
4006                 oils_persist:field_safe="true"
4007                 reporter:label="Compressed Display Entry" 
4008                 oils_persist:readonly="true">
4009                 <fields>
4010                         <field name="source" reporter:datatype="id" />
4011                         <field name="name" reporter:datatype="text"/>
4012                         <field name="multi" reporter:datatype="bool"/>
4013                         <field name="label" reporter:datatype="text"/>
4014                         <field name="field" reporter:datatype="link"/>
4015                         <field name="value" reporter:datatype="text"/>
4016                 </fields>
4017                 <links>
4018                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4019                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4020                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4021                 </links>
4022                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4023                         <actions>
4024                                 <retrieve/>
4025                         </actions>
4026                 </permacrud>
4027         </class>
4028         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
4029                 oils_persist:tablename="metabib.wide_display_entry"
4030                 oils_obj:fieldmapper="metabib::wide_display_entry" 
4031                 oils_persist:field_safe="true"
4032                 reporter:label="Wide Display Entry" 
4033                 oils_persist:readonly="true">
4034                 <fields oils_persist:primary="source">
4035                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
4036                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
4037                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
4038                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
4039                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
4040                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
4041                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
4042                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
4043                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
4044                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
4045                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
4046                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
4047                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
4048                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
4049                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
4050                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
4051                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
4052                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
4053                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
4054                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
4055                 </fields>
4056                 <links>
4057                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4058                 </links>
4059                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4060                         <actions>
4061                                 <retrieve/>
4062                         </actions>
4063                 </permacrud>
4064         </class>
4065
4066         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
4067                 oils_persist:tablename="config.display_field_map"
4068                 oils_obj:fieldmapper="config::display_field_map"
4069                 oils_persist:field_safe="true"
4070                 reporter:label="Display Field Map">
4071                 <fields oils_persist:primary="name">
4072                         <field name="name" reporter:datatype="text"/>
4073                         <field name="field" reporter:datatype="link"/>
4074                         <field name="multi" reporter:datatype="bool"/>
4075                 </fields>
4076                 <links>
4077                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4078                 </links>
4079                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4080                         <actions>
4081                                 <retrieve/>
4082                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
4083                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
4084                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
4085                         </actions>
4086                 </permacrud>
4087         </class>
4088
4089         <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">
4090                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
4091                         <field name="id" reporter:datatype="id" />
4092                         <field name="field" reporter:datatype="link"/>
4093                         <field name="source" reporter:datatype="link"/>
4094                         <field name="value"  reporter:datatype="text"/>
4095                 </fields>
4096                 <links>
4097                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4098                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4099                 </links>
4100         </class>
4101         <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">
4102                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
4103                         <field name="id" reporter:datatype="id" />
4104                         <field name="value" reporter:datatype="text"/>
4105                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4106                 </fields>
4107                 <links>
4108                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
4109                 </links>
4110         </class>
4111         <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">
4112                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
4113                         <field name="id" reporter:datatype="id" />
4114                         <field name="entry" reporter:datatype="link"/>
4115                         <field name="def" reporter:datatype="link"/>
4116                         <field name="source" reporter:datatype="link"/>
4117                 </fields>
4118                 <links>
4119                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4120                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
4121                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4122                 </links>
4123         </class>
4124         <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">
4125                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
4126                         <field name="id" reporter:datatype="id" />
4127                         <field name="entry" reporter:datatype="link"/>
4128                         <field name="simple_heading" reporter:datatype="link"/>
4129                 </fields>
4130                 <links>
4131                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4132                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
4133                 </links>
4134         </class>
4135         <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">
4136                 <oils_persist:source_definition><![CDATA[
4137                         SELECT * FROM metabib.author_field_entry
4138                                                 UNION ALL
4139                         SELECT * FROM metabib.keyword_field_entry
4140                                                 UNION ALL
4141                         SELECT * FROM metabib.identifier_field_entry
4142                                                 UNION ALL
4143                         SELECT * FROM metabib.title_field_entry
4144                                                 UNION ALL
4145                         SELECT * FROM metabib.subject_field_entry
4146                                                 UNION ALL
4147                         SELECT * FROM metabib.series_field_entry
4148                 ]]></oils_persist:source_definition>
4149                 <fields>
4150                         <field name="field" reporter:datatype="link"/>
4151                         <field name="id" reporter:datatype="id" />
4152                         <field name="source" reporter:datatype="link"/>
4153                         <field name="value"  reporter:datatype="text"/>
4154                 </fields>
4155                 <links>
4156                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4157                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4158                 </links>
4159         </class>
4160         <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">
4161                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
4162                         <field name="field" reporter:datatype="link"/>
4163                         <field name="id" reporter:datatype="id" />
4164                         <field name="source" reporter:datatype="link"/>
4165                         <field name="value"  reporter:datatype="text"/>
4166                 </fields>
4167                 <links>
4168                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4169                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4170                 </links>
4171         </class>
4172         <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">
4173                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4174                         <field name="accepting_usr" reporter:datatype="link"/>
4175                         <field name="amount" reporter:datatype="money" />
4176                         <field name="amount_collected" reporter:datatype="money" />
4177                         <field name="cash_drawer" reporter:datatype="link"/>
4178                         <field name="id" reporter:datatype="id" />
4179                         <field name="note"  reporter:datatype="text"/>
4180                         <field name="payment_ts" reporter:datatype="timestamp"/>
4181                         <field name="xact" reporter:datatype="link"/>
4182                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4183                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4184                 </fields>
4185                 <links>
4186                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4187                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4188                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4189                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4190                 </links>
4191         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4192             <actions>
4193                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4194                     <context link="xact" jump="usr" field="home_ou"/>
4195                 </retrieve>
4196                         </actions>
4197                 </permacrud>
4198         </class>
4199         <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">
4200                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4201                         <field name="accepting_usr" reporter:datatype="link"/>
4202                         <field name="amount" reporter:datatype="money" />
4203                         <field name="amount_collected" reporter:datatype="money" />
4204                         <field name="id" reporter:datatype="id" />
4205                         <field name="note"  reporter:datatype="text"/>
4206                         <field name="payment_ts" reporter:datatype="timestamp"/>
4207                         <field name="xact" reporter:datatype="link"/>
4208                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4209                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4210                 </fields>
4211                 <links>
4212                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4213                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4214                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4215                 </links>
4216         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4217             <actions>
4218                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4219                     <context link="xact" jump="usr" field="home_ou"/>
4220                 </retrieve>
4221                         </actions>
4222                 </permacrud>
4223         </class>
4224         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4225                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4226                         <field name="accepting_usr" reporter:datatype="link"/>
4227                         <field name="amount" reporter:datatype="money" />
4228                         <field name="amount_collected" reporter:datatype="money" />
4229                         <field name="id" reporter:datatype="id" />
4230                         <field name="note"  reporter:datatype="text"/>
4231                         <field name="payment_ts" reporter:datatype="timestamp"/>
4232                         <field name="xact" reporter:datatype="link"/>
4233                         <field name="billing" reporter:datatype="link"/>
4234                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4235                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4236                 </fields>
4237                 <links>
4238                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4239                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4240                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4241                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4242                 </links>
4243         </class>
4244         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4245                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4246                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4247                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4248                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4249                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4250                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4251                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4252                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4253                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4254                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4255                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4256                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4257                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4258                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4259                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4260                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4261                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4262                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4263                 </fields>
4264                 <links>
4265                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4266                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4267                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4268                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4269                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4270                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4271                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4272                 </links>
4273         </class>
4274
4275         <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">
4276                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4277                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4278                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4279                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4280                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4281                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4282                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4283                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4284                 </fields>
4285                 <links/>
4286         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4287             <actions>
4288                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4289                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
4290                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4291                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4292             </actions>
4293         </permacrud>
4294         </class>
4295         <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">
4296                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4297                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4298                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4299                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4300                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4301                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4302                 </fields>
4303                 <links>
4304                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4305                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4306                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4307         </links>
4308         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4309             <actions>
4310                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4311                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4312                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4313                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4314             </actions>
4315         </permacrud>
4316         </class>
4317         <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">
4318                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4319                         <field name="holdable" reporter:datatype="bool"/>
4320                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4321                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4322                         <field name="opac_visible" reporter:datatype="bool"/>
4323             <field name="copy_active" reporter:datatype="bool"/>
4324             <field name="restrict_copy_delete" reporter:datatype="bool"/>
4325             <field name="is_available" reporter:datatype="bool"/>
4326                 </fields>
4327                 <links/>
4328         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4329             <actions>
4330                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4331                 <retrieve/>
4332                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4333                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4334             </actions>
4335         </permacrud>
4336         </class>
4337         <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">
4338                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
4339                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4340                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4341                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4342                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4343                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4344                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4345                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4346                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
4347                 </fields>
4348                 <links>
4349                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4350                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4351                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4352                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4353                 </links>
4354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4355                         <actions>
4356                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4357                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4358                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4359                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4360                         </actions>
4361                 </permacrud>
4362         </class>
4363         <class id="aua" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
4364                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4365                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4366                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4367                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4368                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4369                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4370                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4371                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4372                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4373                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4374                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4375                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4376                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4377                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4378                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4379                 </fields>
4380                 <links>
4381                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4382                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4383                 </links>
4384                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4385                         <actions>
4386                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4387                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4388                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4389                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4390                         </actions>
4391                 </permacrud>
4392         </class>
4393         <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">
4394                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4395                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4396                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4397                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4398                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4399                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4400                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4401                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4402                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4403                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4404                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4405                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4406                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4407                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4408                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4409                 </fields>
4410                 <links>
4411                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4412                 </links>
4413                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4414                         <actions>
4415                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4416                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4417                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4418                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4419                         </actions>
4420                 </permacrud>
4421         </class>
4422
4423
4424         <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">
4425                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4426                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4427                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4428                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4429                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4430                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4431                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4432                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4433                 </fields>
4434                 <links>
4435                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4436                 </links>
4437         </class>
4438
4439         <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">
4440                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4441                         <field name="call_number" />
4442                         <field name="create_date" reporter:datatype="timestamp"/>
4443                         <field name="creator" reporter:datatype="link"/>
4444                         <field name="id" reporter:datatype="id" />
4445                         <field name="pub" reporter:datatype="bool"/>
4446                         <field name="title"  reporter:datatype="text"/>
4447                         <field name="value"  reporter:datatype="text"/>
4448                 </fields>
4449                 <links>
4450                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4451                 </links>
4452         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4453             <actions>
4454                 <create permission="CREATE_VOLUME_NOTE">
4455                     <context link="call_number" field="owning_lib"/>
4456                 </create>
4457                 <retrieve permission="VIEW_VOLUME_NOTES">
4458                     <context link="call_number" field="owning_lib"/>
4459                 </retrieve>
4460                 <update permission="UPDATE_VOLUME_NOTE">
4461                     <context link="call_number" field="owning_lib"/>
4462                 </update>
4463                 <delete permission="DELETE_VOLUME_NOTE">
4464                     <context link="call_number" field="owning_lib"/>
4465                 </delete>
4466             </actions>
4467         </permacrud>
4468         </class>
4469         <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">
4470                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4471                         <field name="create_date" reporter:datatype="timestamp"/>
4472                         <field name="creator" reporter:datatype="link"/>
4473                         <field name="edit_date" reporter:datatype="timestamp"/>
4474                         <field name="editor" reporter:datatype="link"/>
4475                         <field name="id" reporter:datatype="id" />
4476                         <field name="record" reporter:datatype="link"/>
4477                         <field name="value" reporter:datatype="text"/>
4478                 </fields>
4479                 <links>
4480                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4481                 </links>
4482         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4483             <actions>
4484                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4485                 <retrieve/>
4486                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4487                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4488             </actions>
4489         </permacrud>
4490         </class>
4491         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4492         <oils_persist:source_definition><![CDATA[
4493 SELECT  usr,
4494         SUM(
4495             CASE
4496                 WHEN (
4497                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4498                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4499                 ) THEN 1
4500                 ELSE 0
4501             END
4502         ) AS out,
4503
4504         SUM(
4505             CASE
4506                 WHEN (
4507                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4508                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4509                 ) THEN 1
4510                 ELSE 0
4511             END
4512         ) AS overdue,
4513
4514         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4515         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4516         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4517   FROM  action.circulation
4518   WHERE checkin_time IS NULL
4519   GROUP BY 1
4520         ]]></oils_persist:source_definition>
4521         <fields oils_persist:primary="usr">
4522             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4523             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4524             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4525             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4526             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4527             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4528         </fields>
4529         <links>
4530             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4531         </links>
4532         </class>
4533         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4534         <oils_persist:source_definition><![CDATA[
4535 SELECT  usr,
4536         STRING_AGG(
4537             CASE
4538                 WHEN (
4539                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4540                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4541                 ) THEN id::TEXT
4542                 ELSE '0'
4543             END
4544         ,',') AS out,
4545
4546         STRING_AGG(
4547             CASE
4548                 WHEN (
4549                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4550                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4551                 ) THEN id::TEXT
4552                 ELSE '0'
4553             END
4554         ,',') AS overdue,
4555
4556         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4557         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4558         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4559   FROM  action.circulation
4560   WHERE checkin_time IS NULL
4561   GROUP BY 1
4562         ]]></oils_persist:source_definition>
4563         <fields oils_persist:primary="usr">
4564             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4565             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4566             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4567             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4568             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4569             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4570         </fields>
4571         <links>
4572             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4573         </links>
4574         </class>
4575         <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">
4576                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4577                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4578                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4579                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4580                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4581                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4582                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4583                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4584                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4585                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4586                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4587                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4588                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4589                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4590                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4591                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4592                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4593                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4594                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4595                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4596                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4597                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4598                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4599                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4600                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4601                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4602                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4603                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4604                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4605                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4606                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4607                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4608                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4609                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4610                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4611                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4612                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4613                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4614                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4615                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4616                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4617                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4618                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4619                 </fields>
4620                 <links>
4621                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4622                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4623                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4624                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4625                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4626                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4627                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4628                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4629                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4630                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4631                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4632                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4633                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4634                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4635                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4636                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4637                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4638                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4639                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4640                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4641                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4642                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4643                 </links>
4644                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4645                         <actions>
4646                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4647                         </actions>
4648                 </permacrud>
4649         </class>
4650         <class id="aacct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_circulation_combined_types" oils_persist:tablename="action.all_circulation_combined_types" reporter:core="true" reporter:label="All Circulation Combined Types" oils_persist:readonly="true">
4651                 <fields>
4652                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4653                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4654                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4655                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4656                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4657                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4658                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4659                 </fields>
4660                 <links>
4661                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4662                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4663                 </links>
4664                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4665                         <actions>
4666                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4667                         </actions>
4668                 </permacrud>
4669         </class>
4670         <class id="aacs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_circulation_slim" oils_persist:tablename="action.all_circulation_slim" reporter:core="true" reporter:label="Combined Aged and Active circulations" oils_persist:readonly="true">
4671                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4672                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4673                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4674                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4675                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4676                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4677                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4678                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4679                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4680                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4681                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4682                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4683                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4684                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4685                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4686                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4687                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4688                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4689                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4690                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4691                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4692                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4693                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4694                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4695                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4696                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4697                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4698                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4699                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4700                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4701                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4702                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4703                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4704                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4705                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4706                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4707                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4708                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4709                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4710                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4711                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4712                 </fields>
4713                 <links>
4714                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4715                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4716                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4717                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4718                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4719                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4720                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4721                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4722                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4723                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4724                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4725                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4726                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4727                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4728                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4729                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4730                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4731                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4732                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4733                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4734                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4735                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4736                 </links>
4737                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4738                         <actions>
4739                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4740                         </actions>
4741                 </permacrud>
4742         </class>
4743
4744         <class id="combcirc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_circulation" oils_persist:tablename="action.all_circulation" reporter:core="true" reporter:label="Combined Aged and Active Circulations" oils_persist:readonly="true">
4745                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4746                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4747                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4748                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4749                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4750                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4751                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4752                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4753                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4754                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4755                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4756                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4757                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4758                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4759                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4760                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4761                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4762                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4763                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4764                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4765                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4766                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4767                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4768                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4769                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4770                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4771                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4772                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4773                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4774                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4775                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4776                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4777                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4778                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4779                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4780                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4781                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4782                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4783                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4784                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4785                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4786                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4787                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4788                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4789                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4790                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4791                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4792                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4793                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4794                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4795                 </fields>
4796                 <links>
4797                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4798                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4799                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4800                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4801                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4802                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4803                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4804                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4805                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4806                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4807                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4808                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4809                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4810                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4811                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4812                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4813                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4814                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4815                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4816                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4817                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4818                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4819                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4820                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4821                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4822                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4823                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4824                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4825                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4826                 </links>
4827                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4828                         <actions>
4829                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4830                         </actions>
4831                 </permacrud>
4832         </class>
4833         <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">
4834                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4835                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4836                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4837                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4838                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4839                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4840                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4841                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4842                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4843                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4844                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4845                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4846                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4847                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4848                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4849                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4850                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4851                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4852                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4853                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4854                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4855                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4856                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4857                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4858                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4859                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4860                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4861                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4862                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4863                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4864                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4865                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4866                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4867                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4868                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4869                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4870                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4871                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4872                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4873                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4874                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4875                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4876                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4877                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4878                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4879                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4880                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4881                 </fields>
4882                 <links>
4883                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4884                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4885                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4886                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4887                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4888                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4889                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4890                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4891                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4892                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4893                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4894                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4895                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4896                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4897                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4898                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4899                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4900                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4901                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4902                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4903                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4904                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4905                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4906                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4907                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4908                 </links>
4909         </class>
4910         <class id="auch" 
4911                 controller="open-ils.cstore" 
4912                 oils_obj:fieldmapper="action::user_circ_history" 
4913                 oils_persist:tablename="action.usr_circ_history" 
4914                 reporter:label="User Checkout History">
4915                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4916                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4917                         <!-- prevent reporting on the user that owns the checkout history -->
4918                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4919                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4920                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4921                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4922                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4923                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4924                 </fields>
4925                 <links>
4926                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4927                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4928                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4929                 </links>
4930         </class>
4931         <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">
4932                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4933                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4934                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4935                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4936                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4937                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4938                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4939                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4940                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4941                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4942                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4943                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4944                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4945                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4946                 </fields>
4947                 <links>
4948                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4949                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4950                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4951                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4952                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4953                 </links>
4954                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4955                         <actions>
4956                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4957                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4958                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4959                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4960                         </actions>
4961                 </permacrud>
4962         </class>
4963
4964         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4965                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4966                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4967                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4968                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4969                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4970                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4971                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4972                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4973                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4974                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4975                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4976                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4977                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4978                 </fields>
4979                 <links>
4980                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4981                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4982                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4983                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4984                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4985                 </links>
4986                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4987                         <actions>
4988                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4989                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4990                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4991                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4992                         </actions>
4993                 </permacrud>
4994         </class>
4995         
4996         <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">
4997                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4998                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4999                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5000                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
5001                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
5002                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
5003                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
5004                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5005                 </fields>
5006                 <links>
5007                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5008                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
5009                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
5010                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
5011                 </links>
5012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5013                         <actions>
5014                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5015                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5016                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5017                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5018                         </actions>
5019                 </permacrud>
5020         </class>
5021         
5022         <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">
5023                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
5024                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
5025                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5026                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
5027                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
5028                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5029                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5030                 </fields>
5031                 <links>
5032                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5033                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
5034                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
5035                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
5036                 </links>
5037                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5038                         <actions>
5039                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5040                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5041                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5042                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5043                         </actions>
5044                 </permacrud>
5045         </class>
5046         
5047         <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">
5048                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
5049                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
5050                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
5051                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
5052                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
5053                 </fields>
5054                 <links>
5055                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
5056                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
5057                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
5058                 </links>
5059                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5060                         <actions>
5061                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5062                     <context link="resource" field="owner" />
5063                 </create>
5064                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5065                     <context link="resource" field="owner" />
5066                 </retrieve>
5067                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5068                     <context link="resource" field="owner" />
5069                 </update>
5070                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5071                     <context link="resource" field="owner" />
5072                 </delete>
5073                         </actions>
5074                 </permacrud>
5075         </class>
5076         
5077         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
5078                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5079                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5080                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5081                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5082                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5083                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5084                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5085                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5086                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5087                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5088                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5089                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
5090                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
5091                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
5092                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
5093                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
5094                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
5095                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
5096                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
5097                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5098                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5099                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5100                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
5101                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
5102                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
5103                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
5104                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
5105                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
5106                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5107                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5108                 </fields>
5109                 <links>
5110                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5111                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5112                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5113                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5114                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5115                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5116                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
5117                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5118                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5119                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5120                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
5121                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
5122                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
5123                 </links>
5124                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5125                         <actions>
5126                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5127                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5128                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5129                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5130                         </actions>
5131                 </permacrud>
5132         </class>
5133         
5134         <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">
5135                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
5136                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
5137                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
5138                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
5139                 </fields>
5140                 <links>
5141                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5142                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
5143                 </links>
5144                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5145                         <actions>
5146                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5147                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5148                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5149                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5150                         </actions>
5151                 </permacrud>
5152         </class>
5153
5154         <class id="ccnbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item" reporter:label="Call Number Bucket Item">
5155                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
5156                         <field name="bucket" reporter:datatype="link"/>
5157                         <field name="id" reporter:datatype="id" />
5158                         <field name="target_call_number" reporter:datatype="link" />
5159                         <field name="create_time" reporter:datatype="timestamp" />
5160                         <field name="pos" reporter:datatype="int" />
5161                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5162                 </fields>
5163                 <links>
5164                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
5165                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5166             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
5167                 </links>
5168                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5169                         <actions>
5170                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
5171                     <context link="bucket" owning_lib="owning_lib"/>
5172                 </retrieve>
5173             </actions>
5174         </permacrud>
5175         </class>
5176         <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">
5177                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
5178                         <field name="id" reporter:datatype="id" />
5179                         <field name="item" reporter:datatype="link"/>
5180                         <field name="note" reporter:datatype="text" />
5181                 </fields>
5182                 <links>
5183                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
5184                 </links>
5185         </class>
5186         <class id="cbreb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket" oils_persist:tablename="container.biblio_record_entry_bucket" reporter:label="Bibliographic Record Entry Bucket">
5187                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
5188                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5189                         <field name="btype" reporter:datatype="text"/>
5190                         <field name="id" reporter:datatype="id" />
5191                         <field name="name" reporter:datatype="text"/>
5192                         <field name="description" reporter:datatype="text"/>
5193                         <field name="owner" reporter:datatype="link"/>
5194                         <field name="pub" reporter:datatype="bool"/>
5195                         <field name="create_time" reporter:datatype="timestamp" />
5196                         <field name="owning_lib" reporter:datatype="org_unit" />
5197                 </fields>
5198                 <links>
5199                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5200                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5201                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5202                 </links>
5203                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5204                         <actions>
5205                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5206                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5207                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5208                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5209                         </actions>
5210                 </permacrud>
5211         </class>
5212         <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">
5213                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5214                         <field name="id" reporter:datatype="id" />
5215                         <field name="bucket" reporter:datatype="link"/>
5216                         <field name="note" reporter:datatype="text" />
5217                 </fields>
5218                 <links>
5219                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5220                 </links>
5221         </class>
5222         <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">
5223                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5224                         <field name="hold" reporter:datatype="link"/>
5225                         <field name="id" reporter:datatype="id" />
5226                         <field name="target_copy" reporter:datatype="link"/>
5227                         <field name="proximity" reporter:datatype="number"/>
5228                 </fields>
5229                 <links>
5230                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5231                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5232                 </links>
5233         </class>
5234         <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">
5235                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5236                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5237                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5238                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5239                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5240                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5241                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5242                 </fields>
5243                 <links>
5244                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5245                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5246                 </links>
5247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5248             <actions>
5249                 <create permission="CREATE_HOLD_NOTIFICATION">
5250                                         <context link="hold" jump="usr" field="home_ou" />
5251                                 </create>
5252                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5253                                         <context link="hold" jump="usr" field="home_ou" />
5254                                 </retrieve>
5255                 <update permission="CREATE_HOLD_NOTIFICATION">
5256                                         <context link="hold" jump="usr" field="home_ou" />
5257                                 </update>
5258                 <delete permission="CREATE_HOLD_NOTIFICATION">
5259                                         <context link="hold" jump="usr" field="home_ou" />
5260                                 </delete>
5261             </actions>
5262         </permacrud>
5263         </class>
5264         <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">
5265                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5266                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5267                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5268                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5269                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5270                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5271                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5272                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5273                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5274                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5275                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5276                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5277                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5278                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5279                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5280                 </fields>
5281                 <links>
5282                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5283                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5284                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5285                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5286                 </links>
5287         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5288             <actions>
5289                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5290                 <retrieve/>
5291                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5292                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5293             </actions>
5294         </permacrud>
5295         </class>
5296         <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">
5297                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5298                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5299                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5300                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5301                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
5302             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5303             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5304             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5305                 </fields>
5306                 <links>
5307                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5308                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5309                 </links>
5310         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5311             <actions>
5312                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5313                 <retrieve/>
5314                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5315                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5316             </actions>
5317         </permacrud>
5318         </class>
5319         <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">
5320                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5321                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5322             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5323             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5324                 </fields>
5325                 <links>
5326                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5327                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5328                 </links>
5329         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5330             <actions>
5331                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5332                                         <context link="lgroup" field="owner" />
5333                 </create>
5334                 <retrieve/>
5335                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5336                                         <context link="lgroup" field="owner" />
5337                 </update>
5338                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5339                                         <context link="lgroup" field="owner" />
5340                 </delete>
5341             </actions>
5342         </permacrud>
5343         </class>
5344
5345     <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">
5346         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5347             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5348             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5349             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5350             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5351         </fields>
5352         <links>
5353             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5354             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5355         </links>
5356         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5357             <actions>
5358                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5359                 <retrieve/>
5360                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5361                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5362             </actions>
5363         </permacrud>
5364     </class>
5365
5366         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5367                 <fields>
5368                         <field name="sre_id" oils_persist:virtual="true" />
5369                         <field name="location" oils_persist:virtual="true" />
5370                         <field name="owning_lib" oils_persist:virtual="true" />
5371                         <field name="basic_holdings" oils_persist:virtual="true" />
5372                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5373                         <field name="supplement_holdings" oils_persist:virtual="true" />
5374                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5375                         <field name="index_holdings" oils_persist:virtual="true" />
5376                         <field name="index_holdings_add" oils_persist:virtual="true" />
5377                         <field name="online" oils_persist:virtual="true" />
5378                         <field name="missing" oils_persist:virtual="true" />
5379                         <field name="incomplete" oils_persist:virtual="true" />
5380                 </fields>
5381         </class>
5382
5383         <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">
5384                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5385                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5386                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5387                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5388                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5389                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5390                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5391                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5392                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5393                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5394                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5395                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5396                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5397                 </fields>
5398                 <links>
5399                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5400                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5401                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5402                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5403                 </links>
5404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5405                         <actions>
5406                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5407                                 <retrieve/>
5408                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5409                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5410                         </actions>
5411                 </permacrud>
5412         </class>
5413
5414         <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">
5415                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5416                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5417                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5418                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5419                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5420                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5421                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5422                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5423                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5424                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5425                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5426                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5427                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5428                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5429                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5430                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5431                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5432                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5433                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5434                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5435                 </fields>
5436                 <links>
5437                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5438                 </links>
5439                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5440                         <actions>
5441                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5442                                         <context link="subscription" field="owning_lib" />
5443                                 </create>
5444                                 <retrieve />
5445                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5446                                         <context link="subscription" field="owning_lib" />
5447                                 </update>
5448                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5449                                         <context link="subscription" field="owning_lib" />
5450                                 </delete>
5451                         </actions>
5452                 </permacrud>
5453         </class>
5454
5455         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5456                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5457                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5458                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5459                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5460                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5461                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5462                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5463                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5464                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5465                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5466                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5467                 </fields>
5468                 <links>
5469                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5470                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5471                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5472                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5473                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5474                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5475                 </links>
5476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5477                         <actions>
5478                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5479                                 <retrieve />
5480                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5481                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5482                         </actions>
5483                 </permacrud>
5484         </class>
5485
5486         <class id="ssubn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
5487                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5488                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5489                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5490                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5491                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5492                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5493                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5494                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5495                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5496                 </fields>
5497                 <links>
5498                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5499                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5500                 </links>
5501                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5502                         <actions>
5503                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5504                     <context link="subscription" field="owning_lib"/>
5505                 </create>
5506                                 <retrieve />
5507                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5508                     <context link="subscription" field="owning_lib"/>
5509                 </update>
5510                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5511                     <context link="subscription" field="owning_lib"/>
5512                 </delete>
5513                         </actions>
5514                 </permacrud>
5515         </class>
5516
5517         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5518                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5519                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5520                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5521                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5522                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5523                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5524                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5525                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5526                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5527                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5528                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5529                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5530                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5531                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5532                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5533                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5534                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5535                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5536                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5537                 </fields>
5538                 <links>
5539                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5540                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5541                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5542                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5543                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5544                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5545                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5546                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5547                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5548                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5549                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5550                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5551                 </links>
5552                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5553                         <actions>
5554                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5555                                 <retrieve />
5556                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5557                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5558                         </actions>
5559                 </permacrud>
5560         </class>
5561
5562         <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">
5563                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5564                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5565                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5566                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5567                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5568                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5569                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5570                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5571                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5572                 </fields>
5573                 <links>
5574                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5575                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5576                 </links>
5577                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5578                         <actions>
5579                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5580                                         <context link="distribution" field="holding_lib" />
5581                                 </create>
5582                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5583                                         <context link="distribution" field="holding_lib" />
5584                                 </retrieve>
5585                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5586                                         <context link="distribution" field="holding_lib" />
5587                                 </update>
5588                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5589                                         <context link="distribution" field="holding_lib" />
5590                                 </delete>
5591                         </actions>
5592                 </permacrud>
5593         </class>
5594
5595         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5596                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5597                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5598                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5599                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5600                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5601                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5602                 </fields>
5603                 <links>
5604                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5605                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5606                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5607                 </links>
5608                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5609                         <actions>
5610                                 <create permission="ADMIN_SERIAL_STREAM">
5611                                         <context link="distribution" field="holding_lib" />
5612                                 </create>
5613                                 <retrieve />
5614                                 <update permission="ADMIN_SERIAL_STREAM">
5615                                         <context link="distribution" field="holding_lib" />
5616                                 </update>
5617                                 <delete permission="ADMIN_SERIAL_STREAM">
5618                                         <context link="distribution" field="holding_lib" />
5619                                 </delete>
5620                         </actions>
5621                 </permacrud>
5622         </class>
5623
5624         <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">
5625                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5626                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5627                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5628                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5629                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5630                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5631                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5632                 </fields>
5633                 <links>
5634                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5635                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5636                 </links>
5637                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5638                         <actions>
5639                                 <create permission="ADMIN_SERIAL_STREAM">
5640                                         <context link="stream" jump="distribution" field="holding_lib" />
5641                                 </create>
5642                                 <retrieve permission="RECEIVE_SERIAL">
5643                                         <context link="stream" jump="distribution" field="holding_lib" />
5644                                 </retrieve>
5645                                 <update permission="ADMIN_SERIAL_STREAM">
5646                                         <context link="stream" jump="distribution" field="holding_lib" />
5647                                 </update>
5648                                 <delete permission="ADMIN_SERIAL_STREAM">
5649                                         <context link="stream" jump="distribution" field="holding_lib" />
5650                                 </delete>
5651                         </actions>
5652                 </permacrud>
5653         </class>
5654
5655         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5656                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5657                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5658                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5659                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5660                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5661                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5662                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5663                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5664                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5665                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5666                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5667                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5668                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5669                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5670                 </fields>
5671                 <links>
5672                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5673                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5674                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5675                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5676                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5677                 </links>
5678                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5679                         <actions>
5680                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5681                                         <context link="subscription" field="owning_lib" />
5682                                 </create>
5683                                 <retrieve/>
5684                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5685                                         <context link="subscription" field="owning_lib" />
5686                                 </update>
5687                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5688                                         <context link="subscription" field="owning_lib" />
5689                                 </delete>
5690                         </actions>
5691                 </permacrud>
5692         </class>
5693
5694         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5695                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5696                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5697                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5698                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5699                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5700                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5701                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5702                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5703                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5704                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5705                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5706                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5707                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5708                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5709                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5710                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5711                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5712                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5713                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5714                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5715                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5716                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5717                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5718                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5719                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5720                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5721                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5722                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5723                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5724                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5725                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5726                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5727                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5728                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5729                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5730                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5731                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5732                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5733                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5734                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5735                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5736                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5737                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5738                 </fields>
5739                 <links>
5740                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5741                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5742                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5743                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5744                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5745                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5746                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5747                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5748                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5749                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5750                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5751                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5752                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5753                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5754                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5755                 </links>
5756                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5757                         <actions>
5758                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5759                                 <retrieve/>
5760                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5761                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5762                         </actions>
5763                 </permacrud>
5764         </class>
5765
5766         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5767                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5768                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5769                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5770                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5771                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5772                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5773                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5774                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5775                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5776                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5777                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5778                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5779                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5780                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5781                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5782                 </fields>
5783                 <links>
5784                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5785                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5786                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5787                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5788                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5789                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5790                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5791                 </links>
5792                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5793                         <actions>
5794                                 <create permission="ADMIN_SERIAL_ITEM">
5795                                         <context link="stream" jump="distribution" field="holding_lib" />
5796                                 </create>
5797                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5798                                         <context link="stream" jump="distribution" field="holding_lib" />
5799                                 </retrieve>
5800                                 <update permission="ADMIN_SERIAL_ITEM">
5801                                         <context link="stream" jump="distribution" field="holding_lib" />
5802                                 </update>
5803                                 <delete permission="ADMIN_SERIAL_ITEM">
5804                                         <context link="stream" jump="distribution" field="holding_lib" />
5805                                 </delete>
5806                         </actions>
5807                 </permacrud>
5808         </class>
5809
5810         <class id="sin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5811                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5812                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5813                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5814                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5815                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5816                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5817                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5818                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5819                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5820                 </fields>
5821                 <links>
5822                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5823                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5824                 </links>
5825                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5826                         <actions>
5827                                 <create permission="ADMIN_SERIAL_ITEM">
5828                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5829                                 </create>
5830                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5831                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5832                                 </retrieve>
5833                                 <update permission="ADMIN_SERIAL_ITEM">
5834                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5835                                 </update>
5836                                 <delete permission="ADMIN_SERIAL_ITEM">
5837                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5838                                 </delete>
5839                         </actions>
5840                 </permacrud>
5841         </class>
5842         <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">
5843                 <fields>
5844                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5845                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5846                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5847                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5848                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5849                 </fields>
5850                 <links>
5851                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5852                 </links>
5853         </class>
5854         <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">
5855                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5856                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5857                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5858                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5859                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5860                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5861                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5862                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5863                 </fields>
5864                 <links>
5865                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5866                 </links>
5867         </class>
5868         <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">
5869                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5870                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5871                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5872                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5873                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5874                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5875                 </fields>
5876                 <links>
5877                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5878                 </links>
5879                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5880                         <actions>
5881                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5882                                         <context link="distribution" field="holding_lib" />
5883                                 </create>
5884                                 <retrieve/>
5885                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5886                                         <context link="distribution" field="holding_lib" />
5887                                 </update>
5888                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5889                                         <context link="distribution" field="holding_lib" />
5890                                 </delete>
5891                         </actions>
5892                 </permacrud>
5893         </class>
5894
5895         <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">
5896                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5897                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5898                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5899                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5900                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5901                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5902                 </fields>
5903                 <links>
5904                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5905                 </links>
5906                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5907                         <actions>
5908                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5909                                         <context link="distribution" field="holding_lib" />
5910                                 </create>
5911                                 <retrieve/>
5912                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5913                                         <context link="distribution" field="holding_lib" />
5914                                 </update>
5915                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5916                                         <context link="distribution" field="holding_lib" />
5917                                 </delete>
5918                         </actions>
5919                 </permacrud>
5920         </class>
5921
5922         <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">
5923                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5924                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5925                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5926                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5927                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5928                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5929                 </fields>
5930                 <links>
5931                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5932                 </links>
5933                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5934                         <actions>
5935                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5936                                         <context link="distribution" field="holding_lib" />
5937                                 </create>
5938                                 <retrieve/>
5939                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5940                                         <context link="distribution" field="holding_lib" />
5941                                 </update>
5942                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5943                                         <context link="distribution" field="holding_lib" />
5944                                 </delete>
5945                         </actions>
5946                 </permacrud>
5947         </class>
5948
5949         <class id="spt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::pattern_template" oils_persist:tablename="serial.pattern_template" reporter:label="Prediction Pattern Template">
5950                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
5951                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5952                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5953                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
5954                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
5955                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
5956                 </fields>
5957                 <links>
5958                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5959                 </links>
5960                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5961                         <actions>
5962                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5963                                 <retrieve/>
5964                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5965                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5966                         </actions>
5967                 </permacrud>
5968         </class>
5969
5970         <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">
5971                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5972                         <field name="id" reporter:datatype="id" />
5973                         <field name="owning_copy" reporter:datatype="link"/>
5974                         <field name="stat_cat" reporter:datatype="link"/>
5975                         <field name="stat_cat_entry" reporter:datatype="link"/>
5976                 </fields>
5977                 <links>
5978                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5979                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5980                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5981                 </links>
5982                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5983                         <actions>
5984                                 <retrieve/>
5985                         </actions>
5986                 </permacrud>
5987         </class>
5988         <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">
5989                 <fields oils_persist:primary="code">
5990                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5991                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5992                 </fields>
5993                 <links/>
5994         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5995             <actions>
5996                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5997                 <retrieve/>
5998                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5999                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
6000             </actions>
6001         </permacrud>
6002         </class>
6003         <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">
6004                 <fields oils_persist:primary="code">
6005                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
6006                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6007                 </fields>
6008                 <links/>
6009         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6010             <actions>
6011                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6012                 <retrieve/>
6013                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6014                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6015             </actions>
6016         </permacrud>
6017         </class>
6018         <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">
6019                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
6020                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
6021                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
6022                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
6023                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
6024                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
6025                 </fields>
6026                 <links>
6027             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6028         </links>
6029         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6030             <actions>
6031                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6032                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6033                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6034                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6035             </actions>
6036         </permacrud>
6037         </class>
6038         <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">
6039                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
6040                         <field name="id" reporter:datatype="id" />
6041                         <field name="name" reporter:datatype="text"/>
6042                 </fields>
6043                 <links/>
6044         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6045             <actions>
6046                 <create permission="CREATE_LASSO" global_required="true"/>
6047                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
6048                 <update permission="UPDATE_LASSO" global_required="true"/>
6049                 <delete permission="DELETE_LASSO" global_required="true"/>
6050             </actions>
6051         </permacrud>
6052         </class>
6053         <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">
6054                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
6055                         <field name="id" reporter:datatype="id" />
6056                         <field name="lasso" reporter:datatype="link"/>
6057                         <field name="org_unit" reporter:datatype="org_unit"/>
6058                 </fields>
6059                 <links>
6060                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
6061                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6062                 </links>
6063         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6064             <actions>
6065                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
6066                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
6067                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
6068                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
6069             </actions>
6070         </permacrud>
6071         </class>
6072         <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">
6073                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
6074                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6075                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
6076                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
6077                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
6078                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
6079                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
6080                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
6081                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
6082                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
6083                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
6084                 </fields>
6085                 <links>
6086                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6087                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6088                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6089                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
6090                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
6091                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
6092                 </links>
6093         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6094             <actions>
6095                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6096                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6097                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6098                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6099             </actions>
6100         </permacrud>
6101         </class>
6102         <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">
6103                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6104                         <field name="id" reporter:datatype="id" />
6105                         <field name="from_org" reporter:datatype="org_unit"/>
6106                         <field name="to_org" reporter:datatype="org_unit"/>
6107                         <field name="prox" reporter:datatype="int" />
6108                 </fields>
6109                 <links>
6110                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
6111                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
6112                 </links>
6113         </class>
6114         <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">
6115                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6116                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6117                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
6118                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6119                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
6120                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
6121                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
6122                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
6123                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
6124                 </fields>
6125                 <links/>
6126         </class>
6127         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
6128                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
6129                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
6130                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6131                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6132                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
6133                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
6134                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6135                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
6136                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6137                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
6138                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
6139                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
6140                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
6141                 </fields>
6142                 <links>
6143                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6144                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
6145                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
6146                 </links>
6147         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6148             <actions>
6149                 <create permission="ADMIN_SURVEY" context_field="owner"/>
6150                 <retrieve/>
6151                 <update permission="ADMIN_SURVEY" context_field="owner"/>
6152                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
6153             </actions>
6154         </permacrud>
6155         </class>
6156         <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">
6157                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
6158                         <field name="address_type"  reporter:datatype="text"/>
6159                         <field name="city"  reporter:datatype="text"/>
6160                         <field name="country"  reporter:datatype="text"/>
6161                         <field name="county"  reporter:datatype="text"/>
6162                         <field name="id" reporter:datatype="id" />
6163                         <field name="org_unit" reporter:datatype="org_unit"/>
6164                         <field name="post_code"  reporter:datatype="text"/>
6165                         <field name="state"  reporter:datatype="text"/>
6166                         <field name="street1"  reporter:datatype="text"/>
6167                         <field name="street2"  reporter:datatype="text"/>
6168                         <field name="valid" reporter:datatype="bool"/>
6169                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
6170                 </fields>
6171                 <links>
6172                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6173                 </links>
6174         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6175             <actions>
6176                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
6177                 <retrieve/>
6178                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
6179                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
6180             </actions>
6181         </permacrud>
6182         </class>
6183         <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">
6184                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
6185                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6186                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6187                         <field name="query_text" reporter:datatype="text"/>
6188                 </fields>
6189         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6190             <actions>
6191                 <retrieve/>
6192             </actions>
6193         </permacrud>
6194         </class>
6195
6196         <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">
6197                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
6198                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6199                         <field name="owner" reporter:datatype="org_unit"/>
6200                         <field name="code" reporter:datatype="text"/>
6201                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6202                         <field name="create_date" reporter:datatype="timestamp"/>
6203                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6204                 </fields>
6205                 <links>
6206                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6207                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6208                 </links>
6209         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6210             <actions>
6211                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6212                 <retrieve/>
6213                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6214                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6215             </actions>
6216         </permacrud>
6217         </class>
6218         <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">
6219                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6220                         <field name="id" reporter:datatype="id"/>
6221                         <field name="grp" reporter:datatype="link"/>
6222                         <field name="pos" reporter:datatype="int"/>
6223                         <field name="query" reporter:datatype="link"/>
6224                 </fields>
6225                 <links>
6226                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6227                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6228                 </links>
6229         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6230             <actions>
6231                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6232                     <context link="grp" field="owner"/>
6233                 </create>
6234                 <retrieve/>
6235                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6236                     <context link="grp" field="owner"/>
6237                 </update>
6238                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6239                     <context link="grp" field="owner"/>
6240                 </delete>
6241             </actions>
6242         </permacrud>
6243         </class>
6244
6245         <!-- A note: Please update alhr and ahopl when updating ahr -->
6246         <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">
6247                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6248                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6249                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6250                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6251                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6252                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6253                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6254                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6255                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6256                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6257                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6258                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6259                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6260                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6261                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6262                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6263                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6264                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6265                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6266                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6267                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6268                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6269                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6270                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6271                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6272                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6273                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6274                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6275                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6276                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6277                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6278                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6279                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6280                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6281                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6282                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6283                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6284                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6285                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6286                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6287                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6288                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6289                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6290                 </fields>
6291                 <links>
6292                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6293                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6294                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6295                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6296                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6297                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6298                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6299                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6300                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6301                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6302                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6303                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6304                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6305                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6306                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6307                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6308                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6309                 </links>
6310                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6311                         <actions>
6312                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6313                         </actions>
6314                 </permacrud>
6315         </class>
6316         <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">
6317                 <oils_persist:source_definition><![CDATA[
6318                 SELECT
6319                         ahr.*,
6320                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6321                                 copy_location_order_position,
6322                         CASE WHEN au.alias IS NOT NULL THEN
6323                                 au.alias
6324                         ELSE
6325                                 au.first_given_name
6326                         END AS usr_alias_or_first_given_name,
6327                         au.first_given_name AS usr_first_given_name,
6328                         au.second_given_name AS usr_second_given_name,
6329                         au.family_name AS usr_family_name,
6330                         au.prefix AS usr_prefix,
6331                         au.suffix AS usr_suffix,
6332                         au.alias AS usr_alias,
6333                         CASE WHEN au.alias IS NOT NULL THEN
6334                                 au.alias
6335                         ELSE
6336                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6337                                         COALESCE(au.family_name, ''),
6338                                         COALESCE(au.suffix, ''),
6339                                         ', ',
6340                                         COALESCE(au.prefix, ''),
6341                                         COALESCE(au.first_given_name, ''),
6342                                         COALESCE(au.second_given_name, '')
6343                                 ], ' '), E'\\s+,', ',')
6344                         END AS usr_alias_or_display_name,
6345                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6346                                 COALESCE(au.family_name, ''),
6347                                 COALESCE(au.suffix, ''),
6348                                 ', ',
6349                                 COALESCE(au.prefix, ''),
6350                                 COALESCE(au.first_given_name, ''),
6351                                 COALESCE(au.second_given_name, '')
6352                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6353                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6354                                 AS call_number_label,
6355                         siss.label AS issuance_label,
6356                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6357                         ahcm_1.copy_count AS potential_copies
6358                 FROM action.hold_request ahr
6359                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6360                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6361                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6362                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6363                 JOIN actor.usr au ON (au.id = ahr.usr)
6364                 JOIN (
6365                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6366                         FROM asset.copy_location
6367                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6368                 LEFT JOIN actor.usr_standing_penalty ausp 
6369                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6370                 LEFT JOIN config.standing_penalty csp
6371                         ON (
6372                                 csp.id = ausp.standing_penalty AND 
6373                                 csp.block_list LIKE '%CAPTURE%' AND (
6374                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6375                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6376                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6377                                         )
6378                                 )
6379                         )
6380                 JOIN (
6381                         SELECT COUNT(target_copy) AS copy_count, hold
6382                         FROM action.hold_copy_map
6383                         GROUP BY 2
6384                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6385                 LEFT JOIN serial.issuance siss
6386                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6387                 LEFT JOIN asset.copy_location_order acplo
6388                         ON (acp.location = acplo.location AND
6389                                 acp.circ_lib = acplo.org)
6390                 WHERE
6391                         ahr.capture_time IS NULL AND
6392                         ahr.cancel_time IS NULL AND
6393                         csp.id IS NULL AND
6394                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6395                         acp.status IN (0,7)
6396                 ]]></oils_persist:source_definition>
6397                 <fields oils_persist:primary="id">
6398                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6399                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6400                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6401                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6402                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6403                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6404                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6405                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6406                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6407                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6408                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6409                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6410                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6411                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6412                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6413                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6414                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6415                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6416                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6417                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6418                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6419                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6420                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6421                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6422                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6423                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6424                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6425                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6426                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6427                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6428                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6429                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6430                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6431                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6432                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6433                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6434                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6435                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6436                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6437                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6438                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6439                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6440                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6441                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6442                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6443                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6444                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6445                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6446                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6447                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6448                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6449                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6450                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6451                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6452                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6453                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6454                 </fields>
6455                 <links>
6456                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6457                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6458                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6459                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6460                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6461                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6462                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6463                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6464                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6465                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6466                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6467                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6468                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6469                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6470                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6471                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6472                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6473                 </links>
6474                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6475                         <actions>
6476                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6477                         </actions>
6478                 </permacrud>
6479         </class>
6480         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6481                 <oils_persist:source_definition><![CDATA[
6482                         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)
6483                 ]]></oils_persist:source_definition>
6484                 <fields oils_persist:primary="id">
6485                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6486                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6487                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6488                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6489                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6490                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6491                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6492                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6493                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6494                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6495                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6496                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6497                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6498                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6499                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6500                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6501                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6502                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6503                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6504                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6505                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6506                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6507                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6508                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6509                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6510                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6511                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6512                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6513                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6514                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6515                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6516                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6517                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6518                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6519                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6520                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6521                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6522                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6523                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6524                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6525                 </fields>
6526                 <links>
6527                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6528                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6529                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6530                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6531                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6532                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6533                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6534                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6535                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6536                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6537                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6538                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6539                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6540                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6541                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6542                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6543                 </links>
6544         </class>
6545
6546         <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">
6547                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6548                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6549                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6550                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6551                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6552                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6553                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6554                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6555                 </fields>
6556                 <links>
6557                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6558                 </links>
6559                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6560                         <actions>
6561                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6562                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6563                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6564                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6565                         </actions>
6566                 </permacrud>
6567         </class>
6568         <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">
6569                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6570                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6571                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6572                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6573                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6574                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6575                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6576                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6577                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6578                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6579                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6580                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6581                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6582                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6583                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6584                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6585                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6586                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6587                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6588                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6589                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6590                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6591                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6592                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6593                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6594                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6595                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6596                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6597                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6598                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6599                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6600                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6601                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6602                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6603                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6604                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6605                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6606                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6607                 </fields>
6608                 <links>
6609                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6610                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6611                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6612                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6613                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6614                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6615                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6616                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6617                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6618                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6619                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6620                 </links>
6621                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6622                         <actions>
6623                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6624                         </actions>
6625                 </permacrud>
6626         </class>
6627         <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">
6628                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6629                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6630                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6631                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6632                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6633                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6634                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6635                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6636                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6637                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6638                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6639                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6640                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6641                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6642                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6643                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6644                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6645                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6646                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6647                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6648                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6649                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6650                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6651                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6652                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6653                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6654                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6655                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6656                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6657                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6658                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6659                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6660                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6661                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6662                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6663                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6664                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6665                 </fields>
6666                 <links>
6667                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6668                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6669                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6670                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6671                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6672                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6673                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6674                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6675                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6676                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6677                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6678                 </links>
6679                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6680                         <actions>
6681                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6682                         </actions>
6683                 </permacrud>
6684         </class>
6685
6686         <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">
6687                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6688                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6689                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6690                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6691                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6692                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6693                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6694                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6695                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6696                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6697                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6698                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6699                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6700                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6701                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6702                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6703                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6704                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6705                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6706                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6707                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6708                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6709                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6710                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6711                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6712                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6713                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6714                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6715                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6716                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6717                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6718                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6719                 </fields>
6720                 <links>
6721                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6722                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6723                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6724                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6725                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6726                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6727                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6728                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6729                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6730                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6731                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6732                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6733                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6734                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6735                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6736                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6737                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6738                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6739                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6740                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6741                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6742                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6743                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6744                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6745                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6746                 </links>
6747         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6748             <actions>
6749                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6750                 <retrieve />
6751                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6752                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6753             </actions>
6754         </permacrud>
6755         </class>
6756         <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">
6757                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6758                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6759                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6760                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6761                 </fields>
6762                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6763                         <actions>
6764                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6765                                 <retrieve/>
6766                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6767                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6768                         </actions>
6769                 </permacrud>
6770         </class>
6771         <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">
6772                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6773                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6774                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6775                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6776                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6777                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6778                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6779                 </fields>
6780                 <links>
6781                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6782                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6783                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6784                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6785                 </links>
6786                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6787                         <actions>
6788                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6789                                 <retrieve/>
6790                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6791                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6792                         </actions>
6793                 </permacrud>
6794         </class>
6795         <class id="ccnb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket" oils_persist:tablename="container.call_number_bucket" reporter:label="Call Number Bucket">
6796                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6797                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6798                         <field name="btype" reporter:datatype="text"/>
6799                         <field name="id" reporter:datatype="id" />
6800                         <field name="name"  reporter:datatype="text"/>
6801                         <field name="description" reporter:datatype="text"/>
6802                         <field name="owner" reporter:datatype="link"/>
6803                         <field name="pub" reporter:datatype="bool"/>
6804                         <field name="create_time" reporter:datatype="timestamp" />
6805                         <field name="owning_lib" reporter:datatype="org_unit" />
6806                 </fields>
6807                 <links>
6808                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6809                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6810                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6811                 </links>
6812                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6813                         <actions>
6814                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6815                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6816                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6817                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6818                         </actions>
6819                 </permacrud>
6820         </class>
6821         <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">
6822                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6823                         <field name="id" reporter:datatype="id" />
6824                         <field name="bucket" reporter:datatype="link"/>
6825                         <field name="note" reporter:datatype="text" />
6826                 </fields>
6827                 <links>
6828                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6829                 </links>
6830         </class>
6831         <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">
6832                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6833                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6834                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6835                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6836                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6837                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6838                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6839                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6840                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6841                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6842                 </fields>
6843                 <links>
6844                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6845                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6846                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6847                 </links>
6848                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6849                         <actions>
6850                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6851                         </actions>
6852                 </permacrud>
6853         </class>
6854         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6855                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6856                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6857                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6858                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6859                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6860                 </fields>
6861                 <links>
6862                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6863                 </links>
6864                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6865                         <actions>
6866                                 <retrieve permission="VIEW_USER user_request.view">
6867                                         <context link="usr" field="home_ou" />
6868                                 </retrieve>
6869                         </actions>
6870                 </permacrud>
6871         </class>
6872     <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">
6873         <fields oils_persist:primary="field">
6874             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6875             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6876             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6877         </fields>
6878         <links/>
6879         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6880             <actions>
6881                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6882                 <retrieve />
6883                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6884                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6885             </actions>
6886         </permacrud>
6887     </class>
6888         <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">
6889                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6890                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6891                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6892                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6893                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6894                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6895                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6896                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6897                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6898                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6899                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6900                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6901                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6902                 </fields>
6903                 <links>
6904                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6905                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6906                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6907                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6908                 </links>
6909         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6910             <actions>
6911                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6912                 <retrieve />
6913                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6914                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6915             </actions>
6916         </permacrud>
6917         </class>
6918         <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">
6919                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6920                         <field name="field" reporter:datatype="link"/>
6921                         <field name="id" reporter:datatype="id" />
6922                         <field name="source" reporter:datatype="link"/>
6923                         <field name="value"  reporter:datatype="text"/>
6924                 </fields>
6925                 <links>
6926                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6927                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6928                 </links>
6929         </class>
6930         <class id="cub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6931                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6932                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6933                         <field name="btype" reporter:datatype="text"/>
6934                         <field name="id" reporter:datatype="id" />
6935                         <field name="name"  reporter:datatype="text"/>
6936                         <field name="description" reporter:datatype="text"/>
6937                         <field name="owner" reporter:datatype="link"/>
6938                         <field name="pub" reporter:datatype="bool"/>
6939                         <field name="create_time" reporter:datatype="timestamp" />
6940                         <field name="owning_lib" reporter:datatype="org_unit" />
6941                 </fields>
6942                 <links>
6943                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6944                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6945                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6946                 </links>
6947                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6948                         <actions>
6949                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6950                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6951                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6952                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6953                         </actions>
6954                 </permacrud>
6955         </class>
6956         <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">
6957                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6958                         <field name="id" reporter:datatype="id" />
6959                         <field name="bucket" reporter:datatype="link"/>
6960                         <field name="note" reporter:datatype="text" />
6961                 </fields>
6962                 <links>
6963                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6964                 </links>
6965         </class>
6966         <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">
6967                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6968                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6969                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6970                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6971                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6972                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6973                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6974                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6975                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6976                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6977                 </fields>
6978                 <links>
6979                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6980                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6981                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6982                 </links>
6983         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6984             <actions>
6985                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6986                     <context link="xact" jump="usr" field="home_ou"/>
6987                 </retrieve>
6988                         </actions>
6989                 </permacrud>
6990         </class>
6991         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6992                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6993                         <field name="id" reporter:datatype="id" />
6994                         <field name="ind1" />
6995                         <field name="ind2" />
6996                         <field name="record" />
6997                         <field name="subfield" />
6998                         <field name="tag" />
6999                         <field name="value" />
7000                 </fields>
7001                 <links>
7002                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
7003                 </links>
7004         </class>
7005         <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">
7006                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
7007                         <field name="id" reporter:label="ID" reporter:datatype="id" />
7008                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
7009                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
7010                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
7011                 </fields>
7012                 <links>
7013                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
7014                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
7015                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
7016                 </links>
7017         </class>
7018         <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">
7019                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
7020                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
7021                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7022                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
7023                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7024                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
7025                 </fields>
7026                 <links>
7027                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7028                 </links>
7029         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7030             <actions>
7031                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7032                 <retrieve/>
7033                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7034                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7035             </actions>
7036         </permacrud>
7037
7038         </class>
7039         <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">
7040                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
7041                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7042                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
7043                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
7044                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
7045                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7046                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7047                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
7048                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
7049                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
7050                 </fields>
7051                 <links>
7052                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
7053                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
7054                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
7055                 </links>
7056         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7057             <actions>
7058                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
7059                 <retrieve/>
7060                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
7061                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
7062             </actions>
7063         </permacrud>
7064         </class>
7065         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
7066                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
7067                         <field name="create_date" reporter:datatype="timestamp"/>
7068                         <field name="creator" reporter:datatype="link"/>
7069                         <field name="edit_date" reporter:datatype="timestamp"/>
7070                         <field name="editor" reporter:datatype="link"/>
7071                         <field name="id" reporter:datatype="id" />
7072                         <field name="pub" reporter:datatype="bool"/>
7073                         <field name="record" reporter:datatype="link"/>
7074                         <field name="value"  reporter:datatype="text"/>
7075                 </fields>
7076                 <links>
7077                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7078                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7079                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7080                 </links>
7081         </class>
7082         <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">
7083                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7084                         <field name="balance_owed" reporter:datatype="money" />
7085                         <field name="total_owed" reporter:datatype="money" />
7086                         <field name="total_paid" reporter:datatype="money" />
7087                         <field name="usr" reporter:datatype="link"/>
7088                 </fields>
7089                 <links>
7090                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7091                 </links>
7092         </class>
7093     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
7094                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7095                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
7096                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7097                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
7098                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7099                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
7100                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
7101                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7102                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7103                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7104                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7105                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7106                 </fields>
7107                 <links>
7108                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7109                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7110                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7111                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7112                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7113                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7114                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7115                 </links>
7116         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7117             <actions>
7118                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
7119             </actions>
7120         </permacrud>
7121         </class>
7122         <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">
7123                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
7124                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
7125                         <field name="quality" reporter:datatype="int" />
7126                         <field name="source" reporter:datatype="text"/>
7127                         <field name="transcendant" reporter:datatype="bool"/>
7128                         <field name="can_have_copies" reporter:datatype="bool"/>
7129                 </fields>
7130                 <links/>
7131         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7132             <actions>
7133                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
7134                 <retrieve/>
7135                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
7136                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
7137             </actions>
7138         </permacrud>
7139         </class>
7140         <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">
7141                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7142                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7143                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7144                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7145                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7146                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
7147                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
7148                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7149                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7150                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7151                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7152                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7153                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
7154                 </fields>
7155                 <links>
7156                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
7157                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7158                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7159                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7160                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7161                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7162                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7163                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
7164                 </links>
7165                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7166                         <actions>
7167                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7168                                         <context link="usr" field="home_ou" />
7169                                 </retrieve>
7170                         </actions>
7171                 </permacrud>
7172         </class>
7173         <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">
7174                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
7175                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7176                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7177                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7178                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7179                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7180                 </fields>
7181                 <links>
7182                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7183                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7184                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
7185                 </links>
7186         </class>
7187         <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">
7188                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
7189                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
7190                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
7191                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7192                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
7193                 </fields>
7194                 <links>
7195                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7196                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7197                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
7198                 </links>
7199         </class>
7200         <class id="cubi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_item" oils_persist:tablename="container.user_bucket_item" reporter:label="User Bucket Item">
7201                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
7202                         <field name="bucket" reporter:datatype="link"/>
7203                         <field name="id" reporter:datatype="id" />
7204                         <field name="target_user" reporter:datatype="link"/>
7205                         <field name="create_time" reporter:datatype="timestamp" />
7206                         <field name="pos" reporter:datatype="int" />
7207                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7208                 </fields>
7209                 <links>
7210                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7211                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7212             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7213                 </links>
7214                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7215                         <actions>
7216                                 <retrieve permission="ADMIN_USER_BUCKET">
7217                     <context link="bucket" owning_lib="owning_lib"/>
7218                 </retrieve>
7219             </actions>
7220         </permacrud>
7221         </class>
7222         <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">
7223                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7224                         <field name="id" reporter:datatype="id" />
7225                         <field name="item" reporter:datatype="link"/>
7226                         <field name="note" reporter:datatype="text" />
7227                 </fields>
7228                 <links>
7229                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7230                 </links>
7231         </class>
7232         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7233                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7234                         <field name="balance_owed" reporter:datatype="money" />
7235                         <field name="total_owed" reporter:datatype="money" />
7236                         <field name="total_paid" reporter:datatype="money" />
7237                         <field name="usr" reporter:datatype="link"/>
7238                 </fields>
7239                 <links>
7240                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7241                 </links>
7242         </class>
7243         <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">
7244                 <fields oils_persist:primary="code" oils_persist:sequence="">
7245                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7246                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7247                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7248                 </fields>
7249                 <links/>
7250         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7251             <actions>
7252                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7253                 <retrieve/>
7254                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7255                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7256             </actions>
7257         </permacrud>
7258         </class>
7259         <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">
7260                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7261                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7262                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7263                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7264                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7265                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7266                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7267                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7268                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7269                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7270                 </fields>
7271                 <links>
7272                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7273                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7274                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7275                 </links>
7276         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7277             <actions>
7278                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7279                     <context link="xact" jump="usr" field="home_ou"/>
7280                 </retrieve>
7281                         </actions>
7282                 </permacrud>
7283         </class>
7284         <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">
7285                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7286                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7287                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7288                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7289                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7290                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7291                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7292                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7293                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7294                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7295                 </fields>
7296                 <links>
7297                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7298                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7299                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7300                 </links>
7301         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7302             <actions>
7303                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7304                     <context link="xact" jump="usr" field="home_ou"/>
7305                 </retrieve>
7306                         </actions>
7307                 </permacrud>
7308         </class>
7309         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7310                 <fields oils_persist:primary="id" oils_persist:sequence="">
7311                         <field name="checkin_lib" reporter:datatype="link"/>
7312                         <field name="checkin_staff" reporter:datatype="link"/>
7313                         <field name="checkin_time" reporter:datatype="timestamp"/>
7314                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7315                         <field name="circ_staff" reporter:datatype="link"/>
7316                         <field name="desk_renewal" reporter:datatype="bool"/>
7317                         <field name="due_date" reporter:datatype="timestamp"/>
7318                         <field name="duration" reporter:datatype="interval"/>
7319                         <field name="duration_rule" reporter:datatype="link"/>
7320                         <field name="fine_interval" reporter:datatype="interval"/>
7321                         <field name="id" reporter:datatype="id" />
7322                         <field name="max_fine" reporter:datatype="money" />
7323                         <field name="max_fine_rule" reporter:datatype="link"/>
7324                         <field name="opac_renewal" reporter:datatype="bool"/>
7325                         <field name="phone_renewal" reporter:datatype="bool"/>
7326                         <field name="recurring_fine" reporter:datatype="money" />
7327                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7328                         <field name="renewal_remaining" reporter:datatype="int" />
7329             <field name="grace_period" reporter:datatype="interval" />
7330                         <field name="stop_fines" reporter:datatype="text"/>
7331                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7332                         <field name="target_copy" reporter:datatype="link"/>
7333                         <field name="usr" reporter:datatype="link"/>
7334                         <field name="xact_finish" reporter:datatype="timestamp" />
7335                         <field name="xact_start" reporter:datatype="timestamp" />
7336                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7337                 </fields>
7338                 <links>
7339                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7340                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7341                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7342                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7343                 </links>
7344         </class>
7345         <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">
7346                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7347                         <field name="field" reporter:datatype="link"/>
7348                         <field name="id" reporter:datatype="id" />
7349                         <field name="source" reporter:datatype="link"/>
7350                         <field name="value" reporter:datatype="text"/>
7351                 </fields>
7352                 <links>
7353                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7354                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7355                 </links>
7356         </class>
7357         <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">
7358                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7359                         <field name="high" reporter:datatype="money" />
7360                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7361                         <field name="low" reporter:datatype="money" />
7362                         <field name="name" reporter:datatype="text"/>
7363                         <field name="normal" reporter:datatype="money" />
7364                         <field name="recurrence_interval" reporter:datatype="interval"/>
7365             <field name="grace_period" reporter:datatype="interval" />
7366                 </fields>
7367                 <links/>
7368         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7369             <actions>
7370                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7371                 <retrieve/>
7372                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7373                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7374             </actions>
7375         </permacrud>
7376         </class>
7377         <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">
7378                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7379                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7380                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7381                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7382                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7383                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7384                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7385                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7386                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7387                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7388                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7389                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7390                 </fields>
7391                 <links>
7392                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7393                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7394                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7395                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7396                 </links>
7397         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7398             <actions>
7399                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7400                     <context link="xact" jump="usr" field="home_ou"/>
7401                 </retrieve>
7402                         </actions>
7403                 </permacrud>
7404         </class>
7405         <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">
7406                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7407                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7408                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7409                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7410                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7411                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="link"/>
7412                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7413                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7414                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7415                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7416                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7417                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7418                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7419                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7420                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7421                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7422                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7423                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7424                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7425                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7426                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7427                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7428                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7429                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
7430                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7431                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7432                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7433                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7434                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7435                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7436                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7437                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7438                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7439                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7440                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7441                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7442                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7443                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7444                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7445                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7446                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7447                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7448                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7449                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7450                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7451                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7452                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7453                         <field reporter:label="Latest Inventory" name="latest_inventory" oils_persist:virtual="true" reporter:datatype="link"/>
7454                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7455                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7456                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
7457                 </fields>
7458                 <links>
7459                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7460                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7461                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7462                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7463                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7464                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7465                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7466                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7467                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7468                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7469                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7470                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7471                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7472                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7473                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7474                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7475                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7476                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7477                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7478                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7479                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7480                         <link field="latest_inventory" reltype="might_have" key="copy" map="" class="alci"/>
7481                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7482                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7483                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7484                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
7485                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7486                 </links>
7487         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7488             <actions>
7489                 <create permission="CREATE_COPY">
7490                     <context link="call_number" field="owning_lib"/>
7491                 </create>
7492                 <retrieve/>
7493                 <update permission="UPDATE_COPY">
7494                     <context link="call_number" field="owning_lib"/>
7495                 </update>
7496                 <delete permission="DELETE_COPY">
7497                     <context link="call_number" field="owning_lib"/>
7498                 </delete>
7499             </actions>
7500         </permacrud>
7501         </class>
7502
7503         <class id="alci" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::latest_inventory" oils_persist:tablename="asset.latest_inventory" reporter:core="true" reporter:label="Latest Inventory">
7504                 <fields oils_persist:primary="id" oils_persist:sequence="asset.latest_inventory_id_seq">
7505             <field reporter:label="Latest Inventory ID" name="id" reporter:datatype="id"/>
7506                         <field reporter:label="Latest Inventory Date" name="inventory_date" reporter:datatype="timestamp"/>
7507                         <field reporter:label="Latest Inventory Workstation" name="inventory_workstation" reporter:datatype="link"/>
7508                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
7509                 </fields>
7510                 <links>
7511                         <link field="inventory_workstation" reltype="has_a" key="id" map="" class="aws"/>
7512                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7513                 </links>
7514         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7515             <actions>
7516                                 <create/>
7517                                 <retrieve/>
7518                                 <update/>
7519                                 <delete/>
7520             </actions>
7521         </permacrud>
7522         </class>
7523
7524         <class id="ccat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_alert_type" oils_persist:tablename="config.copy_alert_type" reporter:label="Copy Alert Type" oils_persist:restrict_primary="100">
7525                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
7526                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
7527                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
7528                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7529                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7530                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7531                         <field reporter:label="Event" name="event" reporter:datatype="text" />
7532                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
7533                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
7534                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
7535                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
7536                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
7537                 </fields>
7538                 <links>
7539                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
7540                 </links>
7541         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7542             <actions>
7543                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7544                 <retrieve/>
7545                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7546                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
7547             </actions>
7548         </permacrud>
7549         </class>
7550
7551         <class id="acas" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::copy_alert_suppress" oils_persist:tablename="actor.copy_alert_suppress" reporter:label="Copy Alert Suppression">
7552                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
7553                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7554                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
7555                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7556                 </fields>
7557                 <links>
7558                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7559                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7560                 </links>
7561         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7562             <actions>
7563                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7564                 <retrieve/>
7565                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7566                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
7567             </actions>
7568         </permacrud>
7569         </class>
7570
7571         <class id="aca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_alert" oils_persist:tablename="asset.copy_alert" reporter:label="Copy Alert">
7572                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
7573                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7574                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7575                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7576                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7577                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7578                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7579                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7580                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7581                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7582                 </fields>
7583                 <links>
7584                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7585                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7586                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7587                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7588                 </links>
7589         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7590             <actions>
7591                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT" global_required="true"/>
7592                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT" global_required="true"/>
7593                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT" global_required="true"/>
7594                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT" global_required="true"/>
7595             </actions>
7596         </permacrud>
7597         </class>
7598
7599         <class id="aaca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::active_copy_alert" oils_persist:tablename="asset.active_copy_alert" reporter:label="Active Copy Alert" oils_persist:readonly="true">
7600                 <fields oils_persist:primary="id">
7601                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7602                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7603                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7604                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7605                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7606                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7607                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7608                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7609                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7610                 </fields>
7611                 <links>
7612                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7613                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7614                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7615                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7616                 </links>
7617         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7618             <actions>
7619                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT" global_required="true"/>
7620                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT" global_required="true"/>
7621                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT" global_required="true"/>
7622                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT" global_required="true"/>
7623             </actions>
7624         </permacrud>
7625         </class>
7626
7627         <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">
7628                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
7629                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
7630                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
7631                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7632                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7633                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7634                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7635                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7636                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
7637                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
7638                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7639                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7640                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7641                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
7642                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
7643                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
7644                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
7645                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
7646                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
7647                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
7648                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
7649                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
7650                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7651                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7652                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7653                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7654                 </fields>
7655                 <links>
7656                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7657                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7658                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7659                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7660                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7661                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7662                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7663                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7664                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7665                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7666                 </links>
7667                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7668                         <actions>
7669                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7670                                 <retrieve />
7671                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7672                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7673                         </actions>
7674                 </permacrud>
7675         </class>
7676
7677         <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">
7678                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7679                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7680                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7681                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7682                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7683                 </fields>
7684                 <links/>
7685         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7686             <actions>
7687                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7688                 <retrieve/>
7689                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7690                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7691             </actions>
7692         </permacrud>
7693         </class>
7694         <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">
7695                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7696                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7697                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7698                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7699                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7700                 </fields>
7701                 <links/>
7702         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7703             <actions>
7704                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7705                 <retrieve/>
7706                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7707                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7708             </actions>
7709         </permacrud>
7710         </class>
7711         <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">
7712                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7713                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7714                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7715                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7716                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7717                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7718                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7719                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7720                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7721                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7722                 </fields>
7723                 <links>
7724                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7725                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7726                 </links>
7727         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7728             <actions>
7729                 <create permission="CREATE_PERM" global_required="true"/>
7730                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7731                 <update permission="UPDATE_PERM" global_required="true"/>
7732                 <delete permission="DELETE_PERM" global_required="true"/>
7733             </actions>
7734         </permacrud>
7735         </class>
7736         <class id="pgtde" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_tree_display_entry" oils_persist:tablename="permission.grp_tree_display_entry" reporter:label="Permission Group Tree Display Entry">
7737                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_display_entry_id_seq">
7738                         <field reporter:label="Entry ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7739                         <field reporter:label="Group ID" name="grp" reporter:datatype="link" oils_persist:i18n="true"/>
7740                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7741                         <field reporter:label="Org Unit" name="org" reporter:datatype="link"/>
7742                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7743                         <field reporter:label="Child Entries" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7744                 </fields>
7745                 <links>
7746                         <link field="parent" reltype="has_a" key="id" map="" class="pgtde"/>
7747                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7748                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7749                         <link field="children" reltype="has_many" key="parent" map="" class="pgtde"/>
7750                 </links>
7751                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7752                         <actions>
7753                                 <create permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7754                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7755                                 <update permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7756                                 <delete permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7757                         </actions>
7758                 </permacrud>
7759         </class>
7760         <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">
7761                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7762                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7763                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7764                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7765                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7766                 </fields>
7767                 <links>
7768                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7769                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7770                 </links>
7771         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7772             <actions>
7773                 <create permission="ADMIN_SURVEY">
7774                     <context link="question" jump="survey" field="owner"/>
7775                 </create>
7776                 <retrieve/>
7777                 <update permission="ADMIN_SURVEY">
7778                     <context link="question" jump="survey" field="owner"/>
7779                 </update>
7780                 <delete permission="ADMIN_SURVEY">
7781                     <context link="question" jump="survey" field="owner"/>
7782                 </delete>
7783             </actions>
7784         </permacrud>
7785         </class>
7786         <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">
7787                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7788                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7789                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7790                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7791                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7792                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7793                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7794                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7795                 </fields>
7796                 <links>
7797                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7798                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7799                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7800                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7801                 </links>
7802                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7803                         <actions>
7804                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7805                         </actions>
7806                 </permacrud>
7807         </class>
7808         <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">
7809                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7810                         <field name="balance_owed" reporter:datatype="money" />
7811                         <field name="total_owed" reporter:datatype="money" />
7812                         <field name="total_paid" reporter:datatype="money" />
7813                         <field name="usr" reporter:datatype="link"/>
7814                 </fields>
7815                 <links>
7816                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7817                 </links>
7818         </class>
7819         <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">
7820                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7821                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7822                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7823                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7824                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7825                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7826                 </fields>
7827                 <links>
7828                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7829                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7830                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7831                 </links>
7832         </class>
7833         <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">
7834                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7835                         <field name="field" reporter:datatype="link"/>
7836                         <field name="id" reporter:datatype="id" />
7837                         <field name="source" reporter:datatype="link"/>
7838                         <field name="value" reporter:datatype="text"/>
7839                 </fields>
7840                 <links>
7841                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7842                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7843                 </links>
7844         </class>
7845         <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">
7846                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7847                         <field name="field" reporter:datatype="link"/>
7848                         <field name="id" reporter:datatype="id" />
7849                         <field name="source" reporter:datatype="link"/>
7850                         <field name="value" reporter:datatype="text"/>
7851                 </fields>
7852                 <links>
7853                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7854                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7855                 </links>
7856         </class>
7857         <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">
7858                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7859                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7860                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7861                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7862                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7863                 </fields>
7864                 <links>
7865                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7866                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7867                 </links>
7868         </class>
7869         <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">
7870                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7871                         <field name="depth" reporter:datatype="int" />
7872                         <field name="grantable" reporter:datatype="bool"/>
7873                         <field name="grp" reporter:datatype="link"/>
7874                         <field name="id" reporter:datatype="id" />
7875                         <field name="perm" reporter:datatype="link"/>
7876                 </fields>
7877                 <links>
7878                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7879                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7880                 </links>
7881         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7882             <actions>
7883                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7884                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7885                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7886                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7887             </actions>
7888         </permacrud>
7889         </class>
7890         <class id="ccb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
7891                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7892                         <field name="items" oils_persist:virtual="true" />
7893                         <field name="btype" reporter:datatype="text"/>
7894                         <field name="id" reporter:datatype="id" />
7895                         <field name="name" reporter:datatype="text"/>
7896                         <field name="description" reporter:datatype="text"/>
7897                         <field name="owner" reporter:datatype="link"/>
7898                         <field name="pub" reporter:datatype="bool"/>
7899                         <field name="create_time" reporter:datatype="timestamp" />
7900                         <field name="owning_lib" reporter:datatype="org_unit" />
7901                 </fields>
7902                 <links>
7903                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7904                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7905                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7906                 </links>
7907                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7908                         <actions>
7909                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7910                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7911                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7912                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7913                         </actions>
7914                 </permacrud>
7915         </class>
7916         <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">
7917                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7918                         <field name="id" reporter:datatype="id" />
7919                         <field name="bucket" reporter:datatype="link"/>
7920                         <field name="note" reporter:datatype="text" />
7921                 </fields>
7922                 <links>
7923                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7924                 </links>
7925         </class>
7926         <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">
7927                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7928                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
7929                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7930                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
7931                 </fields>
7932                 <links>
7933                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7934                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7935                 </links>
7936         </class>
7937         <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">
7938                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7939                         <field name="depth" reporter:datatype="int"/>
7940                         <field name="grantable" reporter:datatype="bool"/>
7941                         <field name="id" reporter:datatype="id" />
7942                         <field name="perm" reporter:datatype="link"/>
7943                         <field name="usr" reporter:datatype="link"/>
7944                 </fields>
7945                 <links>
7946                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7947                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7948                 </links>
7949         </class>
7950         <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">
7951                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7952                         <field name="object_id" reporter:datatype="text"/>
7953                         <field name="grantable" reporter:datatype="bool"/>
7954                         <field name="id" reporter:datatype="id" />
7955                         <field name="perm" reporter:datatype="link"/>
7956                         <field name="usr" reporter:datatype="link"/>
7957                         <field name="object_type" reporter:datatype="text"/>
7958                 </fields>
7959                 <links>
7960                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7961                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7962                 </links>
7963         </class>
7964         <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">
7965                 <fields oils_persist:primary="id" oils_persist:sequence="">
7966                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7967                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7968                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7969                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7970                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7971                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7972                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7973                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7974                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7975                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7976                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7977                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7978                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7979                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7980                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7981                 </fields>
7982                 <links>
7983                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7984                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7985                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7986                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7987                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7988                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7989                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7990                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7991                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7992                 </links>
7993         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7994             <actions>
7995                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7996                     <context link="xact" jump="usr" field="home_ou"/>
7997                 </retrieve>
7998                         </actions>
7999                 </permacrud>
8000         </class>
8001         <class id="mbp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
8002                 <fields oils_persist:primary="id" oils_persist:sequence="">
8003                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8004                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8005                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8006                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8007                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8008                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8009                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8010                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8011                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8012                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8013                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8014                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8015                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8016                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8017                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8018                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8019                 </fields>
8020                 <links>
8021                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8022                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8023                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8024                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8025                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8026                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8027                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8028                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8029                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8030                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8031                 </links>
8032                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8033                         <actions>
8034                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8035                                         <context link="xact" jump="usr" field="home_ou"/>
8036                                 </retrieve>
8037                         </actions>
8038                 </permacrud>
8039         </class>
8040         <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">
8041                 <fields oils_persist:primary="id" oils_persist:sequence="">
8042                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8043                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8044                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8045                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8046                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8047                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8048                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8049                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8050                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8051                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8052                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8053                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8054                 </fields>
8055                 <links>
8056                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8057                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8058                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8059                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8060                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8061                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8062                 </links>
8063         </class>
8064         <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">
8065                 <fields oils_persist:primary="id" oils_persist:sequence="">
8066                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8067                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8068                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8069                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8070                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8071                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8072                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8073                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8074                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8075                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8076                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8077                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8078                 </fields>
8079                 <links>
8080                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8081                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8082                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8083                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8084                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8085                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8086                 </links>
8087         </class>
8088         <class id="cbrebi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_item" oils_persist:tablename="container.biblio_record_entry_bucket_item" reporter:label="Biblio Record Entry Bucket Item">
8089                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
8090                         <field name="bucket" reporter:datatype="link"/>
8091                         <field name="id" reporter:datatype="id" />
8092                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
8093                         <field name="create_time" reporter:datatype="timestamp" />
8094                         <field name="pos" reporter:datatype="int" />
8095                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8096                 </fields>
8097                 <links>
8098                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
8099                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
8100             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
8101                 </links>
8102                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8103                         <actions>
8104                                 <retrieve permission="ADMIN_COPY_BUCKET">
8105                     <context link="bucket" owning_lib="owning_lib"/>
8106                 </retrieve>
8107             </actions>
8108         </permacrud>
8109         </class>
8110         <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">
8111                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
8112                         <field name="id" reporter:datatype="id" />
8113                         <field name="item" reporter:datatype="link"/>
8114                         <field name="note" reporter:datatype="text" />
8115                 </fields>
8116                 <links>
8117                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
8118                 </links>
8119         </class>
8120         <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">
8121                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
8122                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
8123                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8124                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
8125                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
8126                 </fields>
8127                 <links>
8128                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
8129                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8130                 </links>
8131                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8132                         <actions>
8133                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8134                         </actions>
8135                 </permacrud>
8136         </class>
8137     <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">
8138         <fields oils_persist:primary="field">
8139             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
8140             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
8141             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
8142         </fields>
8143         <links/>
8144         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8145             <actions>
8146                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
8147                 <retrieve />
8148                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
8149                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
8150             </actions>
8151         </permacrud>
8152     </class>
8153         <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">
8154                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
8155                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
8156                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8157                 </fields>
8158                 <links/>
8159         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8160             <actions>
8161                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8162                 <retrieve/>
8163                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8164                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8165             </actions>
8166         </permacrud>
8167         </class>
8168
8169
8170         <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">
8171                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8172                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8173                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8174                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8175                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
8176                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8177                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8178                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8179                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8180                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8181                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8182                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8183                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8184                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8185                 </fields>
8186                 <links>
8187                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8188                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
8189                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8190                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8191                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8192                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8193                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
8194                 </links>
8195         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8196             <actions>
8197                 <create permission="TRANSIT_COPY">
8198                     <context link="target_copy" field="owner"/>
8199                 </create>
8200                 <retrieve/>
8201                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8202                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8203             </actions>
8204         </permacrud>
8205         </class>
8206         <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">
8207                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8208                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8209                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8210                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8211                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
8212                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8213                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8214                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8215                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8216                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8217                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8218                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8219                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8220                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8221                 </fields>
8222                 <links>
8223                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8224                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8225                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8226                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8227                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8228                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8229                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8230                 </links>
8231         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8232             <actions>
8233                 <create permission="TRANSIT_COPY" context_field="owner">
8234                     <context link="target_copy" field="circ_lib"/>
8235                 </create>
8236                 <retrieve/>
8237                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8238                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8239             </actions>
8240         </permacrud>
8241         </class>
8242         <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">
8243                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8244                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8245                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8246                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8247                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8248                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8249                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8250                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8251                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8252                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8253                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8254                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8255                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8256                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8257                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8258                 </fields>
8259                 <links>
8260                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8261                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8262                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8263                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8264                 </links>
8265         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8266             <actions>
8267                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8268                     <context link="xact" jump="usr" field="home_ou"/>
8269                 </retrieve>
8270                         </actions>
8271                 </permacrud>
8272         </class>
8273         <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">
8274                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8275                         <field name="grp" />
8276                         <field name="id" reporter:datatype="id" />
8277                         <field name="usr" />
8278                 </fields>
8279                 <links>
8280                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8281                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8282                 </links>
8283         </class>
8284         <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">
8285                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8286                         <field name="id" reporter:datatype="id" />
8287                         <field name="fq_field" reporter:datatype="text"/>
8288                         <field name="identity_value" reporter:datatype="text"/>
8289                         <field name="translation" reporter:datatype="text"/>
8290                         <field name="string" reporter:datatype="text"/>
8291                 </fields>
8292                 <links>
8293                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
8294                 </links>
8295         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8296             <actions>
8297                 <create permission="CREATE_TRANSLATION" global_required="true"/>
8298                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
8299                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
8300                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
8301             </actions>
8302         </permacrud>
8303         </class>
8304         <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">
8305                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
8306                         <field name="id" reporter:datatype="id" />
8307                         <field name="fm_class" reporter:datatype="text"/>
8308                         <field name="field" reporter:datatype="text"/>
8309                         <field name="owner" reporter:datatype="org_unit"/>
8310                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
8311                 </fields>
8312                 <links>
8313                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8314                 </links>
8315         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8316             <actions>
8317                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8318                 <retrieve/>
8319                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8320                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8321             </actions>
8322         </permacrud>
8323         </class>
8324         <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">
8325                 <fields oils_persist:primary="code">
8326                         <field name="code" reporter:datatype="id" />
8327                         <field name="marc_code" reporter:datatype="text"/>
8328                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8329                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8330                         <field name="rtl" reporter:datatype="bool"/>
8331                 </fields>
8332                 <links/>
8333         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8334             <actions>
8335                 <create permission="CREATE_LOCALE" global_required="true"/>
8336                 <retrieve/>
8337                 <update permission="UPDATE_LOCALE" global_required="true"/>
8338                 <delete permission="DELETE_LOCALE" global_required="true"/>
8339             </actions>
8340         </permacrud>
8341         </class>
8342         <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">
8343                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
8344                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
8345                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
8346                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
8347             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
8348                 </fields>
8349                 <links>
8350                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8351                 </links>
8352         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8353             <actions>
8354                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
8355                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
8356                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
8357                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
8358             </actions>
8359         </permacrud>
8360         </class>
8361
8362         <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">
8363                 <fields oils_persist:primary="id">
8364                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8365                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8366                 </fields>
8367                 <links/>
8368         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8369             <actions>
8370                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8371                 <retrieve/>
8372                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8373                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8374             </actions>
8375         </permacrud>
8376         </class>
8377
8378         <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">
8379                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
8380                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8381                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8382                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8383                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8384                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8385                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8386                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8387                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8388                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8389                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8390                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8391                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8392                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8393                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8394                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
8395                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8396                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8397                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8398                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8399                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8400                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8401                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8402                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8403                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8404                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8405                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8406                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
8407                 </fields>
8408                 <links>
8409                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8410                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8411                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8412                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8413                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8414                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8415                 </links>
8416         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8417             <actions>
8418                 <create permission="user_request.create">
8419                     <context link="usr" field="home_ou"/>
8420                                 </create>
8421                 <retrieve permission="user_request.view">
8422                     <context link="usr" field="home_ou"/>
8423                                 </retrieve>
8424                 <update permission="user_request.update">
8425                     <context link="usr" field="home_ou"/>
8426                                 </update>
8427                 <delete permission="user_request.delete">
8428                     <context link="usr" field="home_ou"/>
8429                                 </delete>
8430             </actions>
8431         </permacrud>
8432         </class>
8433
8434         <class id="aurs" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_status" reporter:label="User Purchase Request with Status" oils_persist="readonly">
8435         <oils_persist:source_definition><![CDATA[
8436             SELECT r.*, CASE
8437                         WHEN r.cancel_reason IS NOT NULL THEN 7 -- Canceled
8438                         WHEN h.fulfillment_time IS NOT NULL THEN 6 -- Fulfilled
8439                         WHEN l.state = 'received' THEN 5 -- Received
8440                         WHEN p.state = 'on-order' AND h.id IS NOT NULL THEN 4 -- Ordered, Hold Placed
8441                         WHEN p.state = 'on-order' AND h.id IS NULL THEN 3 -- Ordered, Hold Not Placed
8442                         WHEN l.id IS NOT NULL THEN 2 -- Pending
8443                         WHEN l.id IS NULL THEN 1 -- New
8444                         ELSE 0 -- Error
8445                     END AS request_status
8446                     ,u.home_ou
8447             FROM      acq.user_request r
8448             JOIN actor.usr u ON (r.usr = u.id)
8449             LEFT JOIN acq.lineitem l ON (r.lineitem = l.id)
8450             LEFT JOIN acq.purchase_order p ON (l.purchase_order = p.id)
8451             LEFT JOIN action.hold_request h ON (h.acq_request = r.id)
8452         ]]></oils_persist:source_definition>
8453                 <fields oils_persist:primary="id">
8454                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8455                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8456                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8457                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8458                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8459                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8460                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8461                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8462                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8463                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8464                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8465                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8466                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8467                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8468                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
8469                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8470                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8471                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8472                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8473                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8474                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8475                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8476                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8477                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8478                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8479                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8480                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
8481                         <field reporter:label="Request Status" name="request_status" reporter:datatype="link" />
8482                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="link"/>
8483                 </fields>
8484                 <links>
8485                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8486                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8487                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8488                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8489                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8490                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8491                         <link field="request_status" reltype="has_a" key="id" map="" class="aurst"/>
8492                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8493                 </links>
8494         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8495             <actions>
8496                 <retrieve permission="user_request.view">
8497                     <context link="usr" field="home_ou"/>
8498                                 </retrieve>
8499             </actions>
8500         </permacrud>
8501         </class>
8502
8503         <class id="aurst" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_status_type" oils_persist:tablename="acq.user_request_status_type" reporter:label="Acquisition Patron Request Status Type">
8504                 <fields oils_persist:primary="id">
8505                         <field reporter:label="Status ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8506                         <field reporter:label="Status" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8507                 </fields>
8508                 <links/>
8509         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8510             <actions>
8511                 <retrieve/>
8512             </actions>
8513         </permacrud>
8514         </class>
8515
8516         <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">
8517                 <fields oils_persist:primary="code">
8518                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
8519                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8520                 </fields>
8521                 <links/>
8522         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8523             <actions>
8524                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8525                 <retrieve/>
8526                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8527                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8528             </actions>
8529         </permacrud>
8530         </class>
8531
8532         <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">
8533                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
8534                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
8535                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
8536                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
8537                         <field reporter:label="Ratio" name="ratio" />
8538                 </fields>
8539                 <links>
8540                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
8541                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
8542                 </links>
8543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8544                         <actions>
8545                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8546                                 <retrieve/>
8547                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8548                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8549                         </actions>
8550                 </permacrud>
8551         </class>
8552
8553         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
8554                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
8555                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8556                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8557                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8558                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8559                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8560                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
8561                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
8562                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
8563                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
8564                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8565                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8566                         <field reporter:label="URL" name="url" reporter:datatype="text" />
8567                         <field reporter:label="Email" name="email" reporter:datatype="text" />
8568                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
8569                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
8570                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
8571                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
8572                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
8573                 </fields>
8574                 <links>
8575                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8576                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8577             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
8578             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
8579                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
8580                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
8581                 </links>
8582         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8583             <actions>
8584                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
8585                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
8586                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
8587                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
8588             </actions>
8589         </permacrud>
8590         </class>
8591
8592         <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">
8593                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
8594                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8595                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8596                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8597                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8598                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8599                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8600                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8601                 </fields>
8602                 <links>
8603                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8604                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8605                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8606                 </links>
8607         </class>
8608
8609         <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">
8610                 <fields oils_persist:primary="code">
8611                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
8612                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8613                 </fields>
8614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8615             <actions>
8616                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8617                 <retrieve/>
8618                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8619                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8620             </actions>
8621                 </permacrud>
8622         </class>
8623
8624         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
8625                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
8626                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
8627                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
8628                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8629                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
8630                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
8631                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
8632                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
8633                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
8634                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
8635                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
8636                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8637                         <field reporter:label="Close Date" name="close_date" reporter:datatype="timestamp" />
8638                         <field reporter:label="Closed By" name="closed_by" reporter:datatype="link" />
8639                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
8640                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
8641                 </fields>
8642                 <links>
8643                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
8644                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8645                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
8646                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
8647                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
8648                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
8649                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
8650                         <link field="closed_by" reltype="has_a" key="id" map="" class="au"/>
8651                 </links>
8652         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8653             <actions>
8654                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
8655                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
8656                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
8657                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
8658             </actions>
8659         </permacrud>
8660         </class>
8661
8662         <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">
8663                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
8664                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8665                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8666                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8667                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
8668                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
8669                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
8670                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8671                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
8672                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8673                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8674                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8675                 </fields>
8676                 <links>
8677                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8678                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8679                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8680                 </links>
8681         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8682             <actions>
8683                 <create   permission="ADMIN_INVOICE">
8684                                         <context link="invoice" field="receiver"/>
8685                                 </create>
8686                 <retrieve permission="ADMIN_INVOICE">
8687                                         <context link="invoice" field="receiver"/>
8688                                 </retrieve>
8689                 <update   permission="ADMIN_INVOICE">
8690                                         <context link="invoice" field="receiver"/>
8691                                 </update>
8692                                 <delete   permission="ADMIN_INVOICE">
8693                                         <context link="invoice" field="receiver"/>
8694                                 </delete>
8695             </actions>
8696         </permacrud>
8697         </class>
8698
8699         <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">
8700                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
8701                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8702                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8703                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8704                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8705                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
8706                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
8707                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8708                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8709                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8710                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8711                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8712                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8713                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
8714                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8715                 </fields>
8716                 <links>
8717                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8718                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8719                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8720                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8721                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8722                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
8723                 </links>
8724         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8725             <actions>
8726                 <create   permission="ADMIN_INVOICE">
8727                                         <context link="invoice" field="receiver"/>
8728                                 </create>
8729                 <retrieve permission="ADMIN_INVOICE">
8730                                         <context link="invoice" field="receiver"/>
8731                                 </retrieve>
8732                 <update   permission="ADMIN_INVOICE">
8733                                         <context link="invoice" field="receiver"/>
8734                                 </update>
8735                                 <delete   permission="ADMIN_INVOICE">
8736                                         <context link="invoice" field="receiver"/>
8737                                 </delete>
8738             </actions>
8739         </permacrud>
8740         </class>
8741
8742         <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">
8743                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
8744                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
8745                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8746                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8747                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8748                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8749                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8750                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
8751                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8752                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
8753                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
8754                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
8755                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8756                 </fields>
8757                 <links>
8758                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8759                 </links>
8760         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8761             <actions>
8762                 <create permission="ADMIN_PROVIDER">
8763                     <context link="provider" field="owner"/>
8764                 </create>
8765                 <retrieve permission="ADMIN_PROVIDER">
8766                     <context link="provider" field="owner"/>
8767                 </retrieve>
8768                 <update permission="ADMIN_PROVIDER">
8769                     <context link="provider" field="owner"/>
8770                 </update>
8771                 <delete permission="ADMIN_PROVIDER">
8772                     <context link="provider" field="owner"/>
8773                 </delete>
8774             </actions>
8775         </permacrud>
8776         </class>
8777
8778         <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">
8779                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
8780                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8781                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8782                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8783                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
8784                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
8785                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
8786         </fields>
8787                 <links>
8788                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8789                 </links>
8790         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8791             <actions>
8792                 <create permission="ADMIN_PROVIDER">
8793                     <context link="provider" field="owner"/>
8794                 </create>
8795                 <retrieve permission="ADMIN_PROVIDER">
8796                     <context link="provider" field="owner"/>
8797                 </retrieve>
8798                 <update permission="ADMIN_PROVIDER">
8799                     <context link="provider" field="owner"/>
8800                 </update>
8801                 <delete permission="ADMIN_PROVIDER">
8802                     <context link="provider" field="owner"/>
8803                 </delete>
8804             </actions>
8805         </permacrud>
8806     </class>
8807         <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">
8808                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
8809                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
8810                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8811                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8812                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8813                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
8814                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8815                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8816                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
8817                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
8818                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
8819                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
8820                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8821                 </fields>
8822                 <links>
8823                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
8824                 </links>
8825         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8826             <actions>
8827                 <create permission="ADMIN_PROVIDER">
8828                     <context link="contact" jump='provider' field="owner"/>
8829                 </create>
8830                 <retrieve permission="ADMIN_PROVIDER">
8831                     <context link="contact" jump='provider' field="owner"/>
8832                 </retrieve>
8833                 <update permission="ADMIN_PROVIDER">
8834                     <context link="contact" jump='provider' field="owner"/>
8835                 </update>
8836                 <delete permission="ADMIN_PROVIDER">
8837                     <context link="contact" jump='provider' field="owner"/>
8838                 </delete>
8839             </actions>
8840         </permacrud>
8841         </class>
8842
8843         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
8844                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
8845                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
8846                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
8847                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
8848                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
8849                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
8850                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
8851                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
8852                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8853                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
8854                 </fields>
8855                 <links>
8856                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
8857                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
8858                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
8859                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8860                 </links>
8861         </class>
8862
8863         <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">
8864                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
8865                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8866                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
8867                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
8868                 </fields>
8869                 <links>
8870             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
8871                 </links>
8872                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8873                         <actions>
8874                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8875                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8876                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8877                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8878                         </actions>
8879                 </permacrud>
8880         </class>
8881
8882         <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">
8883                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
8884                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
8885                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
8886                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
8887                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
8888                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
8889                 </fields>
8890                 <links>
8891                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
8892                 </links>
8893                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8894                         <actions>
8895                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8896                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8897                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8898                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8899                         </actions>
8900                 </permacrud>
8901         </class>
8902
8903         <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">
8904                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
8905                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8906                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8907                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8908                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8909                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8910                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8911                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8912                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
8913                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
8914                 </fields>
8915                 <links>
8916                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8917                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8918             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
8919             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
8920                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
8921                 </links>
8922         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8923             <actions>
8924                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8925                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
8926                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8927                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8928             </actions>
8929         </permacrud>
8930         </class>
8931
8932         <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">
8933                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8934                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8935                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8936                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8937                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8938                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8939                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8940                 </fields>
8941                 <links>
8942                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8943                 </links>
8944                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8945                         <actions>
8946                                 <create permission="ADMIN_FUNDING_SOURCE">
8947                     <context link="funding_source" field="owner"/>
8948                 </create>
8949                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8950                     <context link="funding_source" field="owner"/>
8951                 </retrieve>
8952                                 <update permission="ADMIN_FUNDING_SOURCE">
8953                     <context link="funding_source" field="owner"/>
8954                 </update>
8955                                 <delete permission="ADMIN_FUNDING_SOURCE">
8956                     <context link="funding_source" field="owner"/>
8957                 </delete>
8958                         </actions>
8959                 </permacrud>
8960         </class>
8961
8962         <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">
8963                 <fields oils_persist:primary="id">
8964                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8965                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8966                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8967                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8968                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8969                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8970                 </fields>
8971                 <links>
8972                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8973                 </links>
8974         </class>
8975
8976         <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">
8977                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8978                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8979                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8980                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8981                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8982                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8983                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
8984                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
8985                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8986                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
8987                 </fields>
8988                 <links>
8989                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8990                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8991                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
8992                 </links>
8993                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8994                         <actions>
8995                                 <create permission="ADMIN_ACQ_FUND">
8996                     <context link="fund" field="org"/>
8997                 </create>
8998                                 <retrieve permission="ADMIN_ACQ_FUND">
8999                     <context link="fund" field="org"/>
9000                 </retrieve>
9001                                 <update permission="ADMIN_ACQ_FUND">
9002                     <context link="fund" field="org"/>
9003                 </update>
9004                                 <delete permission="ADMIN_ACQ_FUND">
9005                     <context link="fund" field="org"/>
9006                 </delete>
9007                         </actions>
9008                 </permacrud>
9009         </class>
9010
9011         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
9012                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9013                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9014                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9015                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9016                         <field reporter:label="Year" name="year" reporter:datatype="int" />
9017                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9018                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9019                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9020                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9021                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9022                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9023                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9024                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9025                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9026                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
9027                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
9028                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
9029                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
9030                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
9031                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
9032                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9033                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9034                 </fields>
9035                 <links>
9036                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9037                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9038             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
9039             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
9040             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
9041             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
9042             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
9043             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
9044             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
9045             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
9046             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
9047                 </links>
9048         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
9049             <actions>
9050                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
9051                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9052                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
9053                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
9054             </actions>
9055         </permacrud>
9056         </class>
9057
9058         <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">
9059                 <fields oils_persist:primary="fund">
9060                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9061                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9062                 </fields>
9063                 <links>
9064                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9065                 </links>
9066         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9067             <actions>
9068                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9069                                         <context link="fund" field="org" />
9070                 </retrieve>
9071             </actions>
9072         </permacrud>
9073         </class>
9074
9075         <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">
9076                 <fields oils_persist:primary="fund">
9077                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9078                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
9079                 </fields>
9080                 <links>
9081                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9082                 </links>
9083         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9084             <actions>
9085                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9086                                         <context link="fund" field="org" />
9087                 </retrieve>
9088             </actions>
9089         </permacrud>
9090         </class>
9091
9092         <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">
9093                 <fields oils_persist:primary="fund">
9094                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9095                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
9096                 </fields>
9097                 <links>
9098                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9099                 </links>
9100         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9101             <actions>
9102                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9103                                         <context link="fund" field="org" />
9104                 </retrieve>
9105             </actions>
9106         </permacrud>
9107         </class>
9108
9109         <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">
9110                 <fields oils_persist:primary="fund">
9111                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9112                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9113                 </fields>
9114                 <links>
9115                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9116                 </links>
9117         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9118             <actions>
9119                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9120                                         <context link="fund" field="org" />
9121                 </retrieve>
9122             </actions>
9123         </permacrud>
9124         </class>
9125
9126         <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">
9127                 <fields oils_persist:primary="fund">
9128                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9129                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
9130                 </fields>
9131                 <links>
9132                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9133                 </links>
9134         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9135             <actions>
9136                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9137                                         <context link="fund" field="org" />
9138                 </retrieve>
9139             </actions>
9140         </permacrud>
9141         </class>
9142
9143    <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">
9144         <fields oils_persist:primary="fund">
9145             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9146             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9147         </fields>
9148         <links>
9149             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9150         </links>
9151     </class>
9152
9153    <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">
9154         <fields oils_persist:primary="fund">
9155             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9156             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
9157         </fields>
9158         <links>
9159             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9160         </links>
9161     </class>
9162
9163    <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">
9164         <fields oils_persist:primary="fund">
9165             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9166             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9167         </fields>
9168         <links>
9169             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9170         </links>
9171     </class>
9172
9173    <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">
9174         <fields oils_persist:primary="fund">
9175             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9176             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
9177         </fields>
9178         <links>
9179             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9180         </links>
9181     </class>
9182
9183    <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">
9184         <fields oils_persist:primary="fund">
9185             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9186             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
9187         </fields>
9188         <links>
9189             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9190         </links>
9191     </class>
9192
9193         <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">
9194                 <fields oils_persist:primary="funding_source">
9195                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9196                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
9197                 </fields>
9198                 <links>
9199                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9200                 </links>
9201         </class>
9202
9203         <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">
9204                 <fields oils_persist:primary="funding_source">
9205                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9206                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
9207                 </fields>
9208                 <links>
9209                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9210                 </links>
9211         </class>
9212
9213         <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">
9214                 <fields oils_persist:primary="funding_source">
9215                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9216                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
9217                 </fields>
9218                 <links>
9219                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9220                 </links>
9221         </class>
9222
9223         <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">
9224                 <fields oils_persist:primary="fund">
9225                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9226                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
9227                 </fields>
9228                 <links>
9229                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9230                 </links>
9231         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9232             <actions>
9233                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9234                                         <context link="fund" field="org" />
9235                 </retrieve>
9236             </actions>
9237         </permacrud>
9238     </class>
9239     <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">
9240         <oils_persist:source_definition><![CDATA[
9241             SELECT
9242                 acqf.*,
9243                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
9244                 COALESCE(acqfst.amount, 0.00) AS spent_total,
9245                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
9246                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
9247             FROM
9248                 acq.fund acqf
9249                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
9250                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
9251                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
9252                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
9253         ]]></oils_persist:source_definition>
9254         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9255             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9256             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9257             <field reporter:label="Name" name="name" reporter:datatype="text" />
9258             <field reporter:label="Year" name="year" reporter:datatype="int" />
9259             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9260             <field reporter:label="Code" name="code" reporter:datatype="text" />
9261             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9262             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9263             <field reporter:label="Active" name="active" reporter:datatype="bool" />
9264             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9265             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9266
9267             <!-- non fund-native fields -->
9268             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
9269             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
9270             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
9271             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
9272         </fields>
9273         <links>
9274             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
9275             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9276             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9277         </links>
9278         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9279             <actions>
9280                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9281             </actions>
9282         </permacrud>
9283         </class>
9284         <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">
9285                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
9286                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9287                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9288                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9289                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9290                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9291                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9292                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9293                 </fields>
9294                 <links>
9295                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9296                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9297                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9298                 </links>
9299                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9300                         <actions>
9301                                 <create permission="ADMIN_ACQ_FUND">
9302                     <context link="fund" field="org"/>
9303                 </create>
9304                                 <retrieve permission="ADMIN_ACQ_FUND">
9305                     <context link="fund" field="org"/>
9306                 </retrieve>
9307                                 <update permission="ADMIN_ACQ_FUND">
9308                     <context link="fund" field="org"/>
9309                 </update>
9310                                 <delete permission="ADMIN_ACQ_FUND">
9311                     <context link="fund" field="org"/>
9312                 </delete>
9313                         </actions>
9314                 </permacrud>
9315         </class>
9316
9317     <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">
9318         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
9319             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9320             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9321             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9322             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
9323             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
9324             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9325             <field reporter:label="Note" name="note" reporter:datatype="text" />
9326             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9327         </fields>
9328         <links>
9329             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9330             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9331             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9332         </links>
9333                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9334                         <actions>
9335                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9336                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9337                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9338                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9339                         </actions>
9340                 </permacrud>
9341     </class>
9342
9343         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
9344                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
9345                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
9346                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9347                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
9348                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9349                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9350                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9351                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
9352                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
9353                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9354                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9355                 </fields>
9356                 <links>
9357                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9358                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9359                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9360                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9361                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
9362                 </links>
9363                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9364                         <actions>
9365                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
9366                         </actions>
9367                 </permacrud>
9368         </class>
9369
9370         <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">
9371                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
9372                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9373                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
9374                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9375                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
9376                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
9377                 </fields>
9378                 <links>
9379                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9380                 </links>
9381                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9382                         <actions>
9383                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9384                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
9385                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9386                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9387                         </actions>
9388                 </permacrud>
9389         </class>
9390
9391         <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">
9392                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
9393                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9394                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9395                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9396                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9397                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9398                         <field reporter:label="State" name="state" reporter:datatype="text" />
9399                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
9400                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9401                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9402                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
9403                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9404                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9405                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9406                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
9407                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
9408                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
9409                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
9410                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
9411                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
9412                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9413                 </fields>
9414                 <links>
9415                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9416                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9417                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9418                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
9419                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9420                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
9421                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
9422                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
9423                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9424                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9425                 </links>
9426                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9427                         <actions>
9428                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9429                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9430                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9431                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9432                         </actions>
9433                 </permacrud>
9434         </class>
9435
9436         <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">
9437                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
9438                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9439                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9440                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9441                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
9442                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9443                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9444                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9445                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9446                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9447                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9448                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9449                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9450                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
9451                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9452                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9453                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9454                 </fields>
9455                 <links>
9456                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
9457                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9458                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9459                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9460                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9461                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9462                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9463                 </links>
9464                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9465             <actions>
9466                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9467             </actions>
9468                 </permacrud>
9469         </class>
9470
9471         <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">
9472                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
9473                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9474                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9475                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9476                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9477                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9478                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9479                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
9480                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9481                 </fields>
9482                 <links>
9483                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9484                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9485                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9486                 </links>
9487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9488             <actions>
9489                 <create permission="CREATE_PURCHASE_ORDER">
9490                     <context link="purchase_order" field="ordering_agency"/>
9491                 </create>
9492                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9493                     <context link="purchase_order" field="ordering_agency"/>
9494                 </retrieve>
9495                 <update permission="CREATE_PURCHASE_ORDER">
9496                     <context link="purchase_order" field="ordering_agency"/>
9497                 </update>
9498                 <delete permission="CREATE_PURCHASE_ORDER">
9499                     <context link="purchase_order" field="ordering_agency"/>
9500                 </delete>
9501             </actions>
9502                 </permacrud>
9503         </class>
9504
9505         <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">
9506                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
9507                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9508                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9509                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9510                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
9511                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
9512                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
9513                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9514                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
9515                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9516                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9517                 </fields>
9518                 <links>
9519                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9520                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9521                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9522                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9523                 </links>
9524                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9525             <actions>
9526                 <create permission="CREATE_PURCHASE_ORDER">
9527                     <context link="purchase_order" field="ordering_agency"/>
9528                 </create>
9529                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9530                     <context link="purchase_order" field="ordering_agency"/>
9531                 </retrieve>
9532                 <update permission="CREATE_PURCHASE_ORDER">
9533                     <context link="purchase_order" field="ordering_agency"/>
9534                 </update>
9535                 <delete permission="CREATE_PURCHASE_ORDER">
9536                     <context link="purchase_order" field="ordering_agency"/>
9537                 </delete>
9538             </actions>
9539                 </permacrud>
9540         </class>
9541
9542         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
9543                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
9544                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
9545                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
9546                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
9547                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9548                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9549                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9550                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9551                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
9552                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
9553                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
9554                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
9555                         <field reporter:label="State" name="state" reporter:datatype="text" />
9556                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9557                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9558                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
9559                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9560                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9561                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9562                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
9563                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9564                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9565                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
9566                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
9567                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
9568                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
9569                 </fields>
9570                 <links>
9571                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9572                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9573                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9574                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9575                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9576                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9577                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9578                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
9579                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
9580                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
9581                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9582                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
9583                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9584                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
9585                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
9586                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9587                 </links>
9588                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9589                         <actions>
9590                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
9591                                         <context link="purchase_order" field="ordering_agency"/>
9592                                         <context link="picklist" field="org_unit"/>
9593                                 </retrieve>
9594                         </actions>
9595                 </permacrud>
9596         </class>
9597
9598         <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">
9599                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
9600                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9601                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9602                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9603                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
9604                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9605                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9606                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
9607                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9608                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9609                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
9610                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
9611                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9612                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9613                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
9614                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
9615                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
9616                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9617                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
9618                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9619                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9620                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9621                 </fields>
9622                 <links>
9623                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
9624                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9625                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9626                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9627                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9628                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9629                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9630                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9631                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9632                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9633                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9634                 </links>
9635                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9636                         <actions>
9637                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9638                                         <context link="purchase_order" field="ordering_agency"/>
9639                                         <context link="picklist" field="org_unit"/>
9640                                 </retrieve>
9641                         </actions>
9642                 </permacrud>
9643         </class>
9644
9645         <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">
9646                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
9647                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
9648                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9649                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9650                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9651                 </fields>
9652                 <links>
9653                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9654                 </links>
9655                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9656                         <actions>
9657                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9658                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
9659                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9660                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9661                         </actions>
9662                 </permacrud>
9663         </class>
9664
9665         <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">
9666                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
9667                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
9668                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
9669                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9670                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9671                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9672                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9673                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9674                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
9675                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9676                 </fields>
9677                 <links>
9678                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9679                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9680                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9681                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
9682                 </links>
9683         </class>
9684
9685         <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">
9686                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
9687                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
9688                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
9689                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
9690                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
9691                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
9692                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
9693                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
9694                 </fields>
9695                 <links>
9696                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9697                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
9698                 </links>
9699         </class>
9700
9701         <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">
9702                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
9703                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
9704                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9705                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
9706                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
9707                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
9708                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
9709                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
9710                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9711                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
9712                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9713                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
9714                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
9715                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9716                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
9717                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9718                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
9719                 </fields>
9720                 <links>
9721                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9722                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
9723                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9724                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9725                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9726                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9727                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9728                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9729                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
9730                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
9731                 </links>
9732         </class>
9733
9734         <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">
9735                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9736                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9737                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9738                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9739                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9740                 </fields>
9741                 <links/>
9742                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9743                         <actions>
9744                                 <retrieve />
9745                         </actions>
9746                 </permacrud>
9747         </class>
9748
9749         <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">
9750                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9751                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9752                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9753                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9754                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9755                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9756             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9757                 </fields>
9758                 <links/>
9759         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9760             <actions>
9761                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9762                 <retrieve />
9763                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9764                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9765             </actions>
9766         </permacrud>
9767         </class>
9768
9769         <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">
9770                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9771                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9772                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9773                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9774                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9775                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9776                 </fields>
9777                 <links/>
9778         </class>
9779         <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">
9780                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9781                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9782                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9783                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9784                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9785                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9786                 </fields>
9787                 <links>
9788                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9789                 </links>
9790         </class>
9791
9792         <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">
9793             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9794                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9795                 <field reporter:label="Code" name="code" reporter:datatype="text" />
9796                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9797                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9798                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9799                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9800         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9801
9802             </fields>
9803             <links>
9804                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9805             </links>
9806             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9807                 <actions>
9808                     <create permission="ADMIN_PROVIDER">
9809                         <context link="provider" field="owner"/>
9810                     </create>
9811                     <retrieve permission="ADMIN_PROVIDER">
9812                         <context link="provider" field="owner"/>
9813                     </retrieve>
9814                     <update permission="ADMIN_PROVIDER">
9815                         <context link="provider" field="owner"/>
9816                     </update>
9817                     <delete permission="ADMIN_PROVIDER">
9818                         <context link="provider" field="owner"/>
9819                     </delete>
9820                 </actions>
9821             </permacrud>
9822         </class>
9823         
9824         <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">
9825             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
9826                 <field reporter:label="ID" name="id" reporter:datatype="id" />
9827                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9828                 <field reporter:label="Name" name="name" reporter:datatype="text" />
9829                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
9830             </fields>
9831             <links>
9832                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9833             </links>
9834             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9835                 <actions>
9836                     <create permission="ADMIN_PROVIDER">
9837                         <context link="provider" field="owner"/>
9838                     </create>
9839                     <retrieve permission="ADMIN_PROVIDER">
9840                         <context link="provider" field="owner"/>
9841                     </retrieve>
9842                     <update permission="ADMIN_PROVIDER">
9843                         <context link="provider" field="owner"/>
9844                     </update>
9845                     <delete permission="ADMIN_PROVIDER">
9846                         <context link="provider" field="owner"/>
9847                     </delete>
9848                 </actions>
9849             </permacrud>
9850         </class>
9851         
9852         <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">
9853             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9854                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9855                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9856                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9857                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9858                 </fields>
9859                 <links/>
9860         </class>
9861
9862         <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">
9863                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
9864                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
9865                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
9866                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
9867                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
9868                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
9869                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
9870                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
9871                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
9872                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
9873                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
9874                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
9875                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
9876                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
9877                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
9878                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes"/>
9879                 </fields>
9880                 <links>
9881                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9882                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9883                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9884                 </links>
9885         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9886             <actions>
9887                 <create permission="ADMIN_PROVIDER">
9888                     <context link="provider" field="owner"/>
9889                 </create>
9890                 <retrieve permission="ADMIN_PROVIDER">
9891                     <context link="provider" field="owner"/>
9892                 </retrieve>
9893                 <update permission="ADMIN_PROVIDER">
9894                     <context link="provider" field="owner"/>
9895                 </update>
9896                 <delete permission="ADMIN_PROVIDER">
9897                     <context link="provider" field="owner"/>
9898                 </delete>
9899             </actions>
9900         </permacrud>
9901         </class>
9902
9903         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
9904                 oils_obj:fieldmapper="acq::edi_attr" 
9905                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
9906                 <fields oils_persist:primary="key">
9907                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
9908                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9909                 </fields>
9910         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9911             <actions>
9912                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9913                 <retrieve/>
9914                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9915                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9916             </actions>
9917         </permacrud>
9918         </class>
9919         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
9920                 oils_obj:fieldmapper="acq::edi_attr_set" 
9921                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
9922                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
9923                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9924                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9925                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
9926                 </fields>
9927                 <links>
9928                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
9929                 </links>
9930         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9931             <actions>
9932                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9933                 <retrieve/>
9934                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9935                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9936             </actions>
9937         </permacrud>
9938         </class>
9939         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
9940                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
9941                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
9942                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
9943                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9944                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
9945                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
9946                 </fields>
9947                 <links>
9948                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9949                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
9950                 </links>
9951         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9952             <actions>
9953                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9954                 <retrieve/>
9955                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9956                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9957             </actions>
9958         </permacrud>
9959         </class>
9960
9961
9962         <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">
9963                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
9964                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
9965                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
9966                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
9967                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
9968                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
9969                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
9970                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
9971                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
9972                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
9973                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
9974                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
9975                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
9976                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
9977                 </fields>
9978                 <links>
9979                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
9980                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9981                 </links>
9982         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9983             <actions>
9984                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9985                     <context link="account" jump="provider" field="owner"/>
9986                 </retrieve>
9987                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9988                     <context link="account" jump="provider" field="owner"/>
9989                 </update>
9990                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9991                     <context link="account" jump="provider" field="owner"/>
9992                 </delete>
9993             </actions>
9994         </permacrud>
9995         </class>
9996
9997
9998         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
9999                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
10000                         <field name="id" reporter:datatype="id" />
10001                         <field name="parent" reporter:datatype="link"/>
10002                         <field name="owner" reporter:datatype="link"/>
10003                         <field name="create_time" reporter:datatype="timestamp"/>
10004                         <field name="name" reporter:datatype="text"/>
10005                         <field name="shared" reporter:datatype="bool"/>
10006                         <field name="share_with" reporter:datatype="link"/>
10007                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10008                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
10009                 </fields>
10010                 <links>
10011                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10012                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
10013                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
10014                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10015                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
10016                 </links>
10017         </class>
10018         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
10019                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
10020                         <field name="id" reporter:datatype="id" />
10021                         <field name="parent" reporter:datatype="link"/>
10022                         <field name="owner" reporter:datatype="link"/>
10023                         <field name="create_time" reporter:datatype="timestamp"/>
10024                         <field name="name" reporter:datatype="text"/>
10025                         <field name="shared" reporter:datatype="bool"/>
10026                         <field name="share_with" reporter:datatype="link"/>
10027                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10028                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
10029                 </fields>
10030                 <links>
10031                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10032                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
10033                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
10034                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10035                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
10036                 </links>
10037         </class>
10038         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
10039                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
10040                         <field name="id" reporter:datatype="id" />
10041                         <field name="parent" reporter:datatype="link"/>
10042                         <field name="owner" reporter:datatype="link"/>
10043                         <field name="create_time" reporter:datatype="timestamp"/>
10044                         <field name="name" reporter:datatype="text"/>
10045                         <field name="shared" reporter:datatype="bool"/>
10046                         <field name="share_with" reporter:datatype="link"/>
10047                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10048                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10049                 </fields>
10050                 <links>
10051                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10052                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
10053                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
10054                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10055                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
10056                 </links>
10057         </class>
10058         <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">
10059                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
10060                         <field name="id" reporter:datatype="id" />
10061                         <field name="owner" reporter:datatype="link"/>
10062                         <field name="create_time" reporter:datatype="timestamp"/>
10063                         <field name="name" reporter:datatype="text"/>
10064                         <field name="data" reporter:datatype="text"/>
10065                         <field name="folder" reporter:datatype="link"/>
10066                         <field name="description" reporter:datatype="text"/>
10067                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10068                 </fields>
10069                 <links>
10070                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10071                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
10072                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
10073                 </links>
10074         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10075             <actions>
10076                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10077                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10078                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10079                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10080             </actions>
10081         </permacrud>
10082         </class>
10083         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
10084                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
10085                         <field name="id" reporter:datatype="id" />
10086                         <field name="owner" reporter:datatype="link"/>
10087                         <field name="create_time" reporter:datatype="timestamp"/>
10088                         <field name="template" reporter:datatype="link"/>
10089                         <field name="data" reporter:datatype="text"/>
10090                         <field name="folder" reporter:datatype="link"/>
10091                         <field name="recur" reporter:datatype="bool"/>
10092                         <field name="recurrence" reporter:datatype="interval"/>
10093                         <field name="name" reporter:datatype="text"/>
10094                         <field name="description" reporter:datatype="text"/>
10095                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
10096                 </fields>
10097                 <links>
10098                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10099                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
10100                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
10101                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
10102                 </links>
10103         </class>
10104         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
10105                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
10106                         <field name="id" reporter:datatype="id" />
10107                         <field name="runner" reporter:datatype="link"/>
10108                         <field name="start_time" reporter:datatype="timestamp"/>
10109                         <field name="complete_time" reporter:datatype="timestamp"/>
10110                         <field name="run_time" reporter:datatype="timestamp"/>
10111                         <field name="email" reporter:datatype="text"/>
10112                         <field name="excel_format" reporter:datatype="bool"/>
10113                         <field name="csv_format" reporter:datatype="bool"/>
10114                         <field name="html_format" reporter:datatype="bool"/>
10115                         <field name="error_code" reporter:datatype="int"/>
10116                         <field name="error_text" reporter:datatype="text"/>
10117                         <field name="report" reporter:datatype="link"/>
10118                         <field name="folder" reporter:datatype="link"/>
10119                         <field name="chart_pie" reporter:datatype="bool"/>
10120                         <field name="chart_bar" reporter:datatype="bool"/>
10121                         <field name="chart_line" reporter:datatype="bool"/>
10122                 </fields>
10123                 <links>
10124                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
10125                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
10126                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
10127                 </links>
10128         </class>
10129         <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">
10130                 <fields oils_persist:primary="id">
10131                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10132                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10133                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10134                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10135                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10136                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10137                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10138                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10139                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10140                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10141                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10142                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10143                 </fields>
10144                 <links>
10145                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10146                 </links>
10147                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10148                         <actions>
10149                                 <retrieve />
10150                         </actions>
10151                 </permacrud>
10152         </class>
10153         <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">
10154                 <fields oils_persist:primary="id">
10155                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10156                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10157                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10158                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10159                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10160                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10161                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10162                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10163                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10164                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10165                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10166                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10167                 </fields>
10168                 <links>
10169                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10170                 </links>
10171         </class>
10172         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
10173                 <fields oils_persist:primary="id">
10174                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10175                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
10176                         <field reporter:label="Fingerprint" name="fingerprint" />
10177                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10178                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10179                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10180                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10181                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
10182                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10183                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10184                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10185                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
10186                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
10187                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
10188                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10189                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10190                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
10191                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
10192                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
10193                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
10194                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
10195                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
10196                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10197                 </fields>
10198                 <links>
10199                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
10200                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10201                 </links>
10202         </class>
10203         <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">
10204                 <fields oils_persist:primary="id">
10205                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
10206                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
10207                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
10208                 </fields>
10209                 <links>
10210                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
10211                 </links>
10212         </class>
10213         <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">
10214                 <fields oils_persist:primary="id">
10215                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
10216                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
10217                 </fields>
10218                 <links>
10219                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
10220                 </links>
10221         </class>
10222         <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">
10223                 <fields oils_persist:primary="id">
10224                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
10225                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
10226                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
10227                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
10228                 </fields>
10229                 <links>
10230                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
10231                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
10232                 </links>
10233         </class>
10234         <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">
10235                 <fields oils_persist:primary="xact">
10236                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10237                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
10238                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
10239                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
10240                 </fields>
10241                 <links>
10242                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10243                 </links>
10244         </class>
10245         <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">
10246                 <fields oils_persist:primary="xact">
10247                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10248                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
10249                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
10250                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
10251                 </fields>
10252                 <links>
10253                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10254                 </links>
10255         </class>
10256         <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)">
10257                 <fields oils_persist:primary="id">
10258                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
10259                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
10260                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
10261                 </fields>
10262                 <links>
10263                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10264                 </links>
10265         </class>
10266         <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">
10267                 <fields oils_persist:primary="id">
10268                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
10269                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
10270                 </fields>
10271                 <links>
10272                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10273                 </links>
10274         </class>
10275         <class id="erccpo" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::copy_count_per_org" oils_persist:tablename="extend_reporter.copy_count_per_org" reporter:label="Library Holdings Count with Deleted">
10276                 <fields oils_persist:primary="bibid">
10277                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
10278                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
10279                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
10280                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
10281                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
10282                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
10283                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
10284                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
10285                 </fields>
10286                 <links>
10287                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
10288                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10289                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10290                 </links>
10291         </class>
10292         <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">
10293                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
10294                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
10295                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
10296                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
10297                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
10298                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
10299                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
10300                 </fields>
10301                 <links>
10302                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10303                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
10304                 </links>
10305                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10306                         <actions>
10307                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10308                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10309                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10310                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10311                         </actions>
10312                 </permacrud>
10313         </class>
10314         <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">
10315                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
10316                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
10317                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
10318                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
10319                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10320                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10321                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
10322                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10323                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
10324                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
10325                 </fields>
10326                 <links>
10327                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10328                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10329                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10330                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10331                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10332                 </links>
10333                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10334                         <actions>
10335                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
10336                                         <context link="formula" field="owner"/>
10337                                 </create>
10338                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
10339                                         <context link="formula" field="owner"/>
10340                                 </retrieve>
10341                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
10342                                         <context link="formula" field="owner"/>
10343                                 </update>
10344                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
10345                                         <context link="formula" field="owner"/>
10346                                 </delete>
10347                         </actions>
10348                 </permacrud>
10349         </class>
10350
10351         <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">
10352                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
10353                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10354                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10355                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10356                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
10357                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10358                 </fields>
10359                 <links>
10360                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10361                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10362                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10363                 </links>
10364                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10365                         <actions>
10366                                 <create permission="CREATE_PURCHASE_ORDER">
10367                                         <context link="formula" field="owner"/>
10368                 </create>
10369                                 <retrieve permission="CREATE_PURCHASE_ORDER">
10370                                         <context link="formula" field="owner"/>
10371                 </retrieve>
10372                                 <update permission="CREATE_PURCHASE_ORDER">
10373                                         <context link="formula" field="owner"/>
10374                 </update>
10375                                 <delete permission="CREATE_PURCHASE_ORDER">
10376                                         <context link="formula" field="owner"/>
10377                 </delete>
10378                         </actions>
10379                 </permacrud>
10380         </class>
10381
10382         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
10383                 <fields oils_persist:primary="id">
10384                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
10385                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10386                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
10387                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
10388                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
10389                 </fields>
10390                 <links>
10391                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10392                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
10393                 </links>
10394         </class>
10395
10396         <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">
10397                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
10398                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10399                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10400                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10401                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10402                 </fields>
10403                 <links>
10404                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10405                 </links>
10406                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10407                         <actions>
10408                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10409                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10410                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10411                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10412                         </actions>
10413                 </permacrud>
10414         </class>
10415
10416         <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">
10417                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
10418                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10419                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10420                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10421                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10422                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
10423                 </fields>
10424                 <links>
10425                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10426                 </links>
10427                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10428                         <actions>
10429                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10430                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10431                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10432                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10433                         </actions>
10434                 </permacrud>
10435         </class>
10436
10437         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
10438                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
10439                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10440                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10441                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10442                 </fields>
10443                 <links>
10444                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10445                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10446                 </links>
10447         </class>
10448
10449         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
10450                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
10451                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10452                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10453                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10454                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10455                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10456                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10457                 </fields>
10458                 <links>
10459                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10460                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
10461                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10462                 </links>
10463         </class>
10464
10465         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
10466                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
10467                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10468                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10469                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
10470                 </fields>
10471                 <links>
10472                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10473                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
10474                 </links>
10475         </class>
10476
10477         <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">
10478                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
10479                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10480                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10481                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10482                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10483                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10484                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10485                 </fields>
10486                 <links>
10487                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10488                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
10489                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10490                 </links>
10491         </class>
10492
10493         <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">
10494                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
10495                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
10496                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10497                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
10498                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10499                 </fields>
10500                 <links>
10501                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10502                 </links>
10503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10504             <actions>
10505                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10506                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
10507                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10508                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10509             </actions>
10510                 </permacrud>
10511         </class>
10512
10513         <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">
10514                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
10515                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
10516                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
10517                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
10518                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
10519                 </fields>
10520                 <links>
10521                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10522                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
10523                 </links>
10524                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10525                         <actions>
10526                                 <create permission="ADMIN_CLAIM_POLICY">
10527                                         <context link="claim_policy" field="org_unit"/>
10528                 </create>
10529                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
10530                                         <context link="claim_policy" field="org_unit"/>
10531                 </retrieve>
10532                                 <update permission="ADMIN_CLAIM_POLICY">
10533                                         <context link="claim_policy" field="org_unit"/>
10534                 </update>
10535                                 <delete permission="ADMIN_CLAIM_POLICY">
10536                                         <context link="claim_policy" field="org_unit"/>
10537                 </delete>
10538                         </actions>
10539                 </permacrud>
10540         </class>
10541
10542     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
10543         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
10544             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10545             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
10546             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10547             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
10548             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
10549             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
10550             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
10551             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
10552             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
10553             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
10554             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
10555             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
10556             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
10557             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
10558             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10559             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
10560                                                 <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
10561                                                 <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
10562                                                 <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
10563         </fields>
10564         <links>
10565             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
10566         </links>
10567     </class>
10568
10569     <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">
10570         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
10571             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10572             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10573             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10574             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10575             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10576         </fields>
10577     </class>
10578
10579     <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">
10580         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10581             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10582             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10583             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10584             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10585             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10586             <field reporter:label="City" name="city" reporter:datatype="text"/>
10587             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10588             <field reporter:label="State" name="state" reporter:datatype="text"/>
10589             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10590             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10591             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10592         </fields>
10593     </class>
10594
10595     <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">
10596         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10597             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10598             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10599             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10600             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10601             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10602             <field reporter:label="City" name="city" reporter:datatype="text"/>
10603             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10604             <field reporter:label="State" name="state" reporter:datatype="text"/>
10605             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10606             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10607             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10608         </fields>
10609     </class>
10610
10611     <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">
10612         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
10613             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10614             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10615             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10616             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
10617             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
10618             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10619         </fields>
10620     </class>
10621
10622     <class id="stgs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::setting_stage" oils_persist:tablename="staging.setting_stage" reporter:label="User Setting Stage">
10623         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
10624             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10625             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10626             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10627             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
10628             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
10629             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10630         </fields>
10631     </class>
10632
10633         <class id="afsg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset_group" oils_persist:tablename="action.fieldset_group" reporter:label="Fieldset Group">
10634                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
10635                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
10636                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10637                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
10638                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
10639                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
10640                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
10641                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
10642                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
10643                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10644                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10645                 </fields>
10646                 <links>
10647                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10648                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10649                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
10650                 </links>
10651                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10652                         <actions>
10653                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10654                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10655                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10656                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10657                         </actions>
10658                 </permacrud>
10659         </class>
10660
10661         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
10662                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
10663                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
10664                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10665                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10666                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
10667                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
10668                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
10669                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
10670                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
10671                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
10672                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
10673                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
10674                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
10675                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
10676                 </fields>
10677                 <links>
10678                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10679                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10680                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10681                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
10682                 </links>
10683                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10684                         <actions>
10685                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10686                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10687                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10688                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10689                         </actions>
10690                 </permacrud>
10691         </class>
10692
10693         <class id="afscv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
10694                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
10695                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
10696                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
10697                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
10698                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
10699                 </fields>
10700                 <links>
10701                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
10702                 </links>
10703                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
10704                         <actions>
10705                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10706                     <context link="fieldset" field="owning_lib"/>
10707                 </create>
10708                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10709                     <context link="fieldset" field="owning_lib"/>
10710                 </retrieve>
10711                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10712                     <context link="fieldset" field="owning_lib"/>
10713                 </update>
10714                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10715                     <context link="fieldset" field="owning_lib"/>
10716                 </delete>
10717                         </actions>
10718                 </permacrud>
10719         </class>
10720
10721     <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">
10722         <fields>
10723             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10724             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10725             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10726         </fields>
10727                 <links>
10728                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10729                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10730                 </links>
10731     </class>
10732
10733     <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">
10734         <fields>
10735             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10736             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
10737         </fields>
10738                 <links>
10739                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10740                 </links>
10741     </class>
10742
10743     <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">
10744         <fields>
10745             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10746             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10747             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10748         </fields>
10749                 <links>
10750                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10751                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10752                 </links>
10753     </class>
10754
10755     <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">
10756         <fields>
10757             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10758             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
10759         </fields>
10760                 <links>
10761                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10762                 </links>
10763     </class>
10764
10765     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
10766                 <oils_persist:source_definition><![CDATA[
10767
10768             SELECT  DISTINCT l.*
10769               FROM  action.unfulfilled_hold_loops l
10770                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
10771               WHERE l.count = m.max
10772
10773                 ]]></oils_persist:source_definition>
10774         <fields>
10775             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10776             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10777             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10778         </fields>
10779                 <links>
10780                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10781                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10782                 </links>
10783     </class>
10784
10785         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
10786                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
10787                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
10788                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
10789                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
10790                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
10791                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
10792                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
10793                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
10794                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
10795                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
10796                 </fields>
10797                 <links>
10798                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
10799                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
10800                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
10801                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
10802                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
10803                 </links>
10804         </class>
10805
10806         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
10807                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
10808                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
10809                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
10810                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10811                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
10812                 </fields>
10813                 <links>
10814                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
10815                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
10816                 </links>
10817         </class>
10818
10819         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
10820                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
10821                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
10822                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
10823                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
10824                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
10825                 </fields>
10826                 <links>
10827                 </links>
10828         </class>
10829
10830         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
10831                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
10832                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
10833                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
10834                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10835                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
10836                 </fields>
10837                 <links>
10838                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
10839                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
10840                 </links>
10841         </class>
10842         
10843         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
10844                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
10845                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
10846                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
10847                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
10848                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
10849                 </fields>
10850                 <links>
10851                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
10852                 </links>
10853         </class>
10854         
10855         <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">
10856                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
10857                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
10858                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10859                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10860                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
10861                 </fields>
10862                 <links>
10863                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10864                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
10865                 </links>
10866         </class>
10867
10868         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
10869                 <fields oils_persist:primary="name">
10870                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
10871                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
10872                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
10873                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10874                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
10875                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
10876                 </fields>
10877                 <links>
10878                 </links>
10879         </class>
10880
10881         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
10882                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10883                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10884                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
10885                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10886                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10887                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10888                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10889                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10890                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10891                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10892                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10893                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10894                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10895                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10896                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10897                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10898                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10899                 </fields>
10900                 <links>
10901                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10902                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10903                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10904                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10905                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10906                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10907                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10908                 </links>
10909         </class>
10910
10911         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
10912                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
10913                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
10914                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10915                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10916                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
10917                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
10918                 </fields>
10919                 <links>
10920                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10921                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
10922                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
10923                 </links>
10924         </class>
10925
10926         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
10927                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
10928                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
10929                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
10930                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
10931                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
10932                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
10933                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
10934                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10935                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
10936                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10937                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
10938                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
10939                 </fields>
10940                 <links>
10941                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10942                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
10943                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
10944                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
10945                 </links>
10946         </class>
10947
10948         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
10949                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
10950                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
10951                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
10952                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10953                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10954                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
10955                 </fields>
10956                 <links>
10957                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
10958                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
10959                 </links>
10960         </class>
10961
10962         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
10963                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
10964                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
10965                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10966                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10967                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10968                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
10969                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
10970                 </fields>
10971                 <links>
10972                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10973                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10974                 </links>
10975         </class>
10976
10977         <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">
10978                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
10979                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
10980                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10981                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10982                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10983                 </fields>
10984                 <links>
10985                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10986                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10987                 </links>
10988         </class>
10989
10990         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
10991                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10992                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10993                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10994                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10995                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10996                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10997                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10998                 </fields>
10999                 <links>
11000                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11001                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11002                 </links>
11003         </class>
11004
11005         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
11006                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11007                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11008                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11009                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11010                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11011                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11012                 </fields>
11013                 <links>
11014                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11015                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11016                 </links>
11017         </class>
11018
11019         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
11020                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11021                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11022                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11023                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11024                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11025                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11026                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11027                 </fields>
11028                 <links>
11029                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11030                 </links>
11031         </class>
11032
11033         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
11034                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11035                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11036                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11037                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11038                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11039                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11040                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11041                 </fields>
11042                 <links>
11043                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11044                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11045                 </links>
11046         </class>
11047
11048         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
11049                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11050                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11051                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11052                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11053                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11054                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11055                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11056                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11057                 </fields>
11058                 <links>
11059                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11060                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11061                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11062                 </links>
11063         </class>
11064
11065         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
11066                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11067                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11068                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11069                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11070                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11071                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11072                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11073                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11074                 </fields>
11075                 <links>
11076                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11077                 </links>
11078         </class>
11079
11080         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
11081                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11082                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11083                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11084                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11085                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11086                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11087                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11088                 </fields>
11089                 <links>
11090                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11091                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11092                 </links>
11093         </class>
11094
11095         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
11096                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11097                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11098                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11099                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11100                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11101                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11102                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11103                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11104                 </fields>
11105                 <links>
11106                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11107                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11108                 </links>
11109         </class>
11110
11111         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
11112                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11113                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11114                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11115                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11116                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11117                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11118                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11119                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11120                 </fields>
11121                 <links>
11122                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11123                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11124                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11125                 </links>
11126         </class>
11127
11128         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
11129                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11130                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11131                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11132                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11133                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11134                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11135                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11136                 </fields>
11137                 <links>
11138                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11139                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11140                 </links>
11141         </class>
11142
11143         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
11144                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11145                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11146                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11147                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11148                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11149                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11150                 </fields>
11151                 <links>
11152                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11153                 </links>
11154         </class>
11155
11156         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
11157                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11158                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11159                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11160                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11161                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11162                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11163                 </fields>
11164                 <links>
11165                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11166                 </links>
11167         </class>
11168
11169         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
11170                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11171                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11172                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11173                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11174                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11175                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11176                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11177                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11178                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11179                 </fields>
11180                 <links>
11181                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11182                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11183                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11184                 </links>
11185         </class>
11186
11187         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
11188                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11189                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11190                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11191                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11192                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11193                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11194                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11195                 </fields>
11196                 <links>
11197                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11198                 </links>
11199         </class>
11200
11201         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
11202                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11203                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11204                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11205                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11206                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11207                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11208                 </fields>
11209                 <links>
11210                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11211                 </links>
11212         </class>
11213
11214         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
11215                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11216                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11217                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11218                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11219                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11220                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11221                 </fields>
11222                 <links>
11223                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11224                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11225                 </links>
11226         </class>
11227
11228         <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">
11229                 <fields oils_persist:primary="id">
11230                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
11231                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
11232                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
11233                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
11234                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
11235                 </fields>
11236                 <links>
11237                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
11238                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11239                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
11240                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
11241                 </links>
11242         </class>
11243
11244         <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">
11245                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
11246                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11247                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
11248                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11249                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
11250                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11251                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11252                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
11253                 </fields>
11254                 <links/>
11255                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11256                         <actions>
11257                                 <retrieve/>
11258                         </actions>
11259                 </permacrud>
11260         </class>
11261
11262         <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">
11263                 <fields oils_persist:primary="ptype_key">
11264                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
11265                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11266                 </fields>
11267                 <links/>
11268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11269                         <actions>
11270                                 <retrieve/>
11271                         </actions>
11272                 </permacrud>
11273         </class>
11274
11275         <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">
11276                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
11277                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11278                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
11279                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11280                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11281                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11282                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11283                 </fields>
11284                 <links>
11285                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
11286                 </links>
11287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11288                         <actions>
11289                                 <retrieve/>
11290                         </actions>
11291                 </permacrud>
11292         </class>
11293
11294         <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">
11295                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
11296                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11297                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
11298                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
11299                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11300                 </fields>
11301                 <links>
11302                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11303                 </links>
11304                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11305                         <actions>
11306                                 <retrieve/>
11307                         </actions>
11308                 </permacrud>
11309         </class>
11310
11311     <class
11312         id="uvs"
11313         controller="open-ils.cstore open-ils.pcrud"
11314         oils_obj:fieldmapper="url_verify::session"
11315         oils_persist:tablename="url_verify.session"
11316         reporter:label="URL Verification Session"
11317     >
11318         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
11319             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
11320             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11321                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
11322             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
11323             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
11324             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11325             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
11326             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
11327             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
11328         </fields>
11329
11330         <links>
11331             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11332             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11333             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
11334             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
11335             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
11336         </links>
11337
11338         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11339             <actions>
11340                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
11341             </actions>
11342         </permacrud>
11343
11344     </class>
11345
11346     <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">
11347         <oils_persist:source_definition><![CDATA[
11348             SELECT
11349                 cbrebi.id AS id,  -- so we can have a pkey in our view
11350                 uvs.id AS session,
11351                 uvs.owning_lib,
11352                 cbrebi.target_biblio_record_entry
11353             FROM url_verify.session uvs
11354             JOIN container.biblio_record_entry_bucket cbreb
11355                 ON (uvs.container = cbreb.id)
11356             JOIN container.biblio_record_entry_bucket_item cbrebi
11357                 ON (cbrebi.bucket = cbreb.id)
11358         ]]></oils_persist:source_definition>
11359         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
11360             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
11361             <field reporter:label="Session" name="session" reporter:datatype="link" />
11362             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
11363             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
11364         </fields>
11365         <links>
11366             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
11367             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
11368             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
11369         </links>
11370         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11371             <actions>
11372                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
11373             </actions>
11374         </permacrud>
11375     </class>
11376
11377     <class
11378         id="uvus"
11379         controller="open-ils.cstore open-ils.pcrud"
11380         oils_obj:fieldmapper="url_verify::url_selector"
11381         oils_persist:tablename="url_verify.url_selector"
11382         reporter:label="URL Verification URL Selector"
11383     >
11384         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
11385             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
11386             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
11387                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11388             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
11389         </fields>
11390
11391         <links>
11392             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11393             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
11394         </links>
11395
11396         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11397             <actions>
11398                 <create permission="URL_VERIFY">
11399                     <context link="session" field="owning_lib"/>
11400                 </create>
11401                 <retrieve permission="URL_VERIFY">
11402                     <context link="session" field="owning_lib"/>
11403                 </retrieve>
11404                 <update permission="URL_VERIFY">
11405                     <context link="session" field="owning_lib"/>
11406                 </update>
11407                 <delete permission="URL_VERIFY">
11408                     <context link="session" field="owning_lib"/>
11409                 </delete>
11410             </actions>
11411         </permacrud>
11412
11413     </class>
11414
11415     <class
11416         id="uvu"
11417         controller="open-ils.cstore open-ils.pcrud"
11418         oils_obj:fieldmapper="url_verify::url"
11419         oils_persist:tablename="url_verify.url"
11420         reporter:label="URL Verification URL"
11421     >
11422         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
11423             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
11424                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
11425                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
11426                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11427                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
11428             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11429             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11430             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
11431             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
11432             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
11433             <field reporter:label="Host" name="host" reporter:datatype="text"/>
11434             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
11435             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
11436             <field reporter:label="Path" name="path" reporter:datatype="text"/>
11437             <field reporter:label="Page" name="page" reporter:datatype="text"/>
11438             <field reporter:label="Query" name="query" reporter:datatype="text"/>
11439             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
11440             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
11441         </fields>
11442
11443         <links>
11444             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
11445             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
11446             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11447             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
11448             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
11449         </links>
11450
11451         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11452             <actions>
11453                 <create permission="URL_VERIFY">
11454                     <context link="session" field="owning_lib"/>
11455                 </create>
11456                 <retrieve permission="URL_VERIFY">
11457                     <context link="session" field="owning_lib"/>
11458                 </retrieve>
11459                 <update permission="URL_VERIFY">
11460                     <context link="session" field="owning_lib"/>
11461                 </update>
11462                 <delete permission="URL_VERIFY">
11463                     <context link="session" field="owning_lib"/>
11464                 </delete>
11465             </actions>
11466         </permacrud>
11467
11468     </class>
11469
11470     <class
11471         id="uvva"
11472         controller="open-ils.cstore open-ils.pcrud"
11473         oils_obj:fieldmapper="url_verify::verification_attempt"
11474         oils_persist:tablename="url_verify.verification_attempt"
11475         reporter:label="URL Verification Attempt"
11476     >
11477         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
11478             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
11479                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
11480                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
11481             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
11482             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
11483         </fields>
11484
11485         <links>
11486             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11487             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11488         </links>
11489
11490         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11491             <actions>
11492                 <create permission="URL_VERIFY">
11493                     <context link="session" field="owning_lib"/>
11494                 </create>
11495                 <retrieve permission="URL_VERIFY">
11496                     <context link="session" field="owning_lib"/>
11497                 </retrieve>
11498                 <update permission="URL_VERIFY">
11499                     <context link="session" field="owning_lib"/>
11500                 </update>
11501                 <delete permission="URL_VERIFY">
11502                     <context link="session" field="owning_lib"/>
11503                 </delete>
11504             </actions>
11505         </permacrud>
11506
11507     </class>
11508
11509     <class
11510         id="uvuv"
11511         controller="open-ils.cstore open-ils.pcrud"
11512         oils_obj:fieldmapper="url_verify::url_verification"
11513         oils_persist:tablename="url_verify.url_verification"
11514         reporter:label="URL Verification"
11515     >
11516         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
11517             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
11518                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
11519                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
11520             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
11521             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
11522             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
11523             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
11524                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
11525         </fields>
11526
11527         <links>
11528             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
11529             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
11530             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
11531         </links>
11532
11533         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11534             <actions>
11535                 <create permission="URL_VERIFY">
11536                     <context link="attempt" jump="session" field="owning_lib"/>
11537                 </create>
11538                 <retrieve permission="URL_VERIFY">
11539                     <context link="attempt" jump="session" field="owning_lib"/>
11540                 </retrieve>
11541                 <update permission="URL_VERIFY">
11542                     <context link="attempt" jump="session" field="owning_lib"/>
11543                 </update>
11544                 <delete permission="URL_VERIFY">
11545                     <context link="attempt" jump="session" field="owning_lib"/>
11546                 </delete>
11547             </actions>
11548         </permacrud>
11549
11550     </class>
11551
11552         <class
11553                 id="cfdi"
11554                 controller="open-ils.cstore open-ils.pcrud"
11555                 oils_obj:fieldmapper="config::filter_dialog_interface"
11556                 oils_persist:tablename="config.filter_dialog_interface"
11557                 reporter:label="FilterDialog Interface">
11558                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
11559                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
11560                         <field reporter:label="Description" name="description" reporter:datatype="text" />
11561                 </fields>
11562                 <links>
11563                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
11564                 </links>
11565                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11566                         <actions>
11567                                 <retrieve />
11568                         </actions>
11569                 </permacrud>
11570         </class>
11571
11572         <class
11573                 id="cfdfs"
11574                 controller="open-ils.cstore open-ils.pcrud"
11575                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
11576                 oils_persist:tablename="config.filter_dialog_filter_set"
11577                 reporter:label="FilterDialog Filter Set">
11578                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
11579                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11580                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11581                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11582                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11583                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
11584                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11585                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
11586                 </fields>
11587                 <links>
11588                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11589                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11590                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
11591                 </links>
11592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11593                         <actions>
11594                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11595                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11596                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11597                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11598                         </actions>
11599                 </permacrud>
11600
11601         </class>
11602
11603         <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">
11604                 <fields oils_persist:primary="code">
11605                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
11606                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
11607                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
11608                 </fields>
11609                 <links/>
11610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11611                         <actions>
11612                                 <retrieve/>
11613                         </actions>
11614                 </permacrud>
11615         </class>
11616
11617         <class id="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">
11618                 <oils_persist:source_definition><![CDATA[
11619
11620             SELECT  b.id,
11621                     MAX(dcp.edit_date) AS last_delete_date
11622              FROM   biblio.record_entry b
11623                     JOIN asset.call_number cn ON (cn.record = b.id)
11624                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
11625              WHERE  NOT b.deleted
11626              GROUP BY b.id
11627              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
11628
11629                 ]]></oils_persist:source_definition>
11630                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11631                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11632                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
11633                 </fields>
11634                 <links>
11635                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11636                 </links>
11637                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11638                         <actions>
11639                                 <retrieve/>
11640                         </actions>
11641                 </permacrud>
11642         </class>
11643
11644         <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">
11645                 <oils_persist:source_definition><![CDATA[
11646
11647             -- -- 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.
11648             -- -- 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
11649             -- -- may not.
11650             -- SELECT
11651             --     bre.id AS bib_id,
11652             --     COALESCE( z.copy_count, 0 ) AS copy_count,
11653             --     COALESCE( z.hold_count, 0 ) AS hold_count,
11654             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
11655             -- FROM (
11656                 SELECT
11657                     y.bre AS id,
11658                     COALESCE( x.copy_count, 0 ) AS copy_count,
11659                     y.hold_count AS hold_count,
11660                     (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
11661                 FROM (
11662                         SELECT
11663                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
11664                             COUNT(*) AS hold_count
11665                         FROM action.hold_request h
11666                         WHERE
11667                             cancel_time IS NULL
11668                             AND fulfillment_time IS NULL
11669                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
11670                         GROUP BY 1
11671                     )y LEFT JOIN (
11672                         SELECT 
11673                             (SELECT id
11674                                 FROM biblio.record_entry 
11675                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
11676                             ) AS bre, 
11677                             COUNT(*) AS copy_count
11678                         FROM asset.copy
11679                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
11680                         WHERE copy.holdable 
11681                             AND NOT copy.deleted 
11682                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
11683                         GROUP BY 1
11684                     )x ON x.bre = y.bre
11685                 -- )z RIGHT JOIN (
11686                 --     SELECT id
11687                 --     FROM biblio.record_entry
11688                 --     WHERE NOT deleted
11689                 -- )bre ON (z.bib_id = bre.id)
11690                 
11691
11692                 ]]></oils_persist:source_definition>
11693                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11694                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11695                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
11696                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
11697                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
11698                 </fields>
11699                 <links>
11700                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11701                 </links>
11702                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11703                         <actions>
11704                                 <retrieve/>
11705                         </actions>
11706                 </permacrud>
11707         </class>
11708
11709         <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">
11710                 <oils_persist:source_definition><![CDATA[
11711             SELECT *,
11712                 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,
11713                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
11714             FROM
11715                 (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
11716                     FROM
11717                         action.hold_request ahr
11718                         JOIN reporter.hold_request_record rhrr USING (id)
11719                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11720                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
11721                     WHERE
11722                         ahr.cancel_time IS NULL
11723                         AND ahr.fulfillment_time IS NULL
11724                     GROUP BY bib_record, pickup_lib
11725                 )x
11726                 JOIN
11727                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11728                     FROM
11729                         action.hold_request ahr
11730                         JOIN reporter.hold_request_record rhrr USING (id)
11731                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11732                     WHERE
11733                         ahr.cancel_time IS NULL
11734                         AND ahr.fulfillment_time IS NULL
11735                     GROUP BY bib_record
11736                 )y
11737                 USING (id)
11738                 ]]></oils_persist:source_definition>
11739                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11740                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11741                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
11742                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
11743                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
11744                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11745                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11746                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
11747                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11748                 </fields>
11749                 <links>
11750                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11751                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
11752                 </links>
11753                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11754                         <actions>
11755                                 <retrieve/>
11756                         </actions>
11757                 </permacrud>
11758         </class>
11759
11760         <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) ">
11761                 <oils_persist:source_definition><![CDATA[
11762             WITH counts_at_ou AS (
11763                 SELECT  rhrr.bib_record AS id,
11764                         aou.id AS pickup_lib_or_desc,
11765                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
11766                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
11767                   FROM  actor.org_unit aou
11768                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
11769                         action.hold_request ahr
11770                         JOIN reporter.hold_request_record rhrr USING (id)
11771                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11772                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
11773                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
11774                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
11775                         AND (actor.org_unit_ancestor_at_depth(ahr.pickup_lib,aout.depth)).id = (actor.org_unit_ancestor_at_depth(ac.circ_lib,aout.depth)).id
11776                   GROUP BY 1, 2
11777             )
11778             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
11779                    y.holds_everywhere, y.copy_count_everywhere,
11780                 CASE WHEN copy_count_at_or_below = 0 THEN 'Infinity'::FLOAT ELSE x.holds_at_or_below::FLOAT/x.copy_count_at_or_below END AS hold_copy_ratio_at_or_below_ou,
11781                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
11782             FROM counts_at_ou x
11783                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11784                     FROM
11785                         action.hold_request ahr
11786                         JOIN reporter.hold_request_record rhrr USING (id)
11787                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11788                     WHERE
11789                         ahr.cancel_time IS NULL
11790                         AND ahr.fulfillment_time IS NULL
11791                     GROUP BY bib_record
11792                 )y
11793                 USING (id)
11794                 ]]></oils_persist:source_definition>
11795                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11796                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11797                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
11798                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
11799                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
11800                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11801                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11802                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
11803                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11804                 </fields>
11805                 <links>
11806                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11807                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
11808                 </links>
11809                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11810                         <actions>
11811                                 <retrieve/>
11812                         </actions>
11813                 </permacrud>
11814         </class>
11815
11816         <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">
11817                 <oils_persist:source_definition><![CDATA[
11818             SELECT
11819                 ac.id,
11820                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
11821                 MAX(actac.xact_start) AS last_circ
11822             FROM asset.copy ac
11823                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11824             GROUP BY ac.id
11825
11826             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
11827             --SELECT
11828             --    ac.id,
11829             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
11830             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
11831             --FROM asset.copy ac
11832             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11833             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
11834             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
11835                 ]]></oils_persist:source_definition>
11836                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11837                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
11838                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
11839                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
11840                 </fields>
11841                 <links>
11842                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11843                 </links>
11844                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11845                         <actions>
11846                                 <retrieve/>
11847                         </actions>
11848                 </permacrud>
11849         </class>
11850
11851         <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">
11852                 <fields oils_persist:primary="id">
11853                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
11854                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
11855                 </fields>
11856                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11857                         <actions>
11858                                 <retrieve/>
11859                         </actions>
11860                 </permacrud>
11861         </class>
11862
11863         <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">
11864                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
11865                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11866                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
11867                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11868                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11869                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11870                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11871                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11872                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
11873                 </fields>
11874                 <links>
11875                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
11876                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11877                 </links>
11878                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11879                         <actions>
11880                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11881                                 <retrieve/>
11882                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11883                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11884                         </actions>
11885                 </permacrud>
11886         </class>
11887
11888         <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">
11889                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
11890                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11891                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
11892                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11893                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11894                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11895                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11896                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11897                 </fields>
11898                 <links>
11899                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
11900                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11901                 </links>
11902                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11903                         <actions>
11904                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11905                                 <retrieve/>
11906                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11907                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11908                         </actions>
11909                 </permacrud>
11910         </class>
11911
11912
11913         <!-- ********************************************************************************************************************* -->
11914         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
11915         <!-- ********************************************************************************************************************* -->
11916         <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">
11917                 <fields oils_persist:primary="id">
11918                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
11919                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
11920                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
11921                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11922                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
11923                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
11924                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11925                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
11926                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
11927                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
11928                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
11929                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
11930                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
11931                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
11932                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11933                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
11934                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
11935                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
11936                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
11937                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
11938                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
11939                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
11940                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
11941                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
11942                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
11943                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
11944                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
11945                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
11946                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
11947                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11948                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11949                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11950                 </fields>
11951                 <links>
11952                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11953                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
11954                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
11955                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
11956                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
11957                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
11958                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
11959                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
11960                 </links>
11961         </class>
11962
11963         <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">
11964                 <fields oils_persist:primary="id">
11965                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11966                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11967                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11968                 </fields>
11969                 <links>
11970                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11971                 </links>
11972         </class>
11973
11974         <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">
11975                 <fields oils_persist:primary="id">
11976                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11977                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11978                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11979                 </fields>
11980                 <links>
11981                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11982                 </links>
11983         </class>
11984
11985         <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">
11986                 <fields oils_persist:primary="id">
11987                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
11988
11989                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
11990                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
11991                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
11992
11993                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
11994                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
11995                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
11996
11997                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
11998                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
11999
12000                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12001                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
12002                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
12003
12004                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
12005                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
12006
12007                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
12008                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
12009                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
12010
12011                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
12012                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
12013                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
12014
12015                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12016                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
12017                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
12018                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
12019
12020                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
12021                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
12022
12023                 </fields>
12024                 <links>
12025                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
12026                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12027                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
12028                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
12029                 </links>
12030         </class>
12031
12032         <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">
12033                 <oils_persist:source_definition><![CDATA[
12034
12035             SELECT
12036                 po.ordering_agency AS ordering_agency,
12037                 po.id AS purchase_order,
12038                 li.id AS lineitem,
12039                 lid.id AS lineitem_detail,
12040                 cpa.id AS claim_policy_action
12041             FROM
12042                 acq.lineitem_detail lid
12043                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
12044                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
12045                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
12046                 JOIN acq.claim_policy_action cpa ON (
12047                     cpa.claim_policy = cp.id
12048
12049                     -- we only care about claim policy actions whose claim
12050                     -- interval we'd reached or exceeded
12051                     AND (NOW() - cpa.action_interval) > po.order_date
12052
12053                     -- filter out all claim policy actions where claim events
12054                     -- have occurred on or after the action's action_interval
12055                     AND NOT EXISTS (
12056                         SELECT 1
12057                         FROM
12058                             acq.claim_event evt
12059                             JOIN acq.claim claim ON (
12060                                 claim.id = evt.claim
12061                                 AND claim.lineitem_detail = lid.id
12062                             )
12063                         WHERE
12064                             evt.event_date >= (po.order_date + cpa.action_interval)
12065                     )
12066                 )
12067             WHERE
12068                 lid.cancel_reason IS NULL
12069                 AND li.cancel_reason IS NULL -- belt/suspenders
12070                 AND po.cancel_reason IS NULL -- belt/suspenders
12071                 AND lid.recv_time IS NULL
12072                 AND po.state = 'on-order'
12073             ORDER BY 1, 2, 3, 4, 5
12074
12075                 ]]></oils_persist:source_definition>
12076                 <fields>
12077                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
12078                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
12079                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12080                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
12081                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
12082                 </fields>
12083                 <links>
12084                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
12085                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
12086                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12087                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
12088                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
12089                 </links>
12090         </class>
12091         <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">
12092                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12093                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12094                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12095                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12096                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12097                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12098                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12099                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12100                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12101                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12102                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12103                 </fields>
12104                 <links>
12105                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12106                 </links>
12107     </class>
12108         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
12109                 <oils_persist:source_definition><![CDATA[
12110             SELECT * FROM acq.lineitem_summary 
12111                                 WHERE item_count > (invoice_count + cancel_count)
12112         ]]></oils_persist:source_definition>
12113                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12114                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12115                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12116                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12117                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12118                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12119                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12120                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12121                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12122                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12123                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12124                 </fields>
12125                 <links>
12126                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12127                 </links>
12128     </class>
12129         <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">
12130                 <oils_persist:source_definition><![CDATA[
12131
12132                         SELECT  t.*
12133                           FROM  action.transit_copy t
12134                                 JOIN actor.org_unit AS s ON (t.source = s.id)
12135                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
12136                           WHERE s.parent_ou <> d.parent_ou
12137
12138                 ]]></oils_persist:source_definition>
12139                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
12140                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
12141                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
12142                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
12143                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
12144                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
12145                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
12146                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
12147                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
12148                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
12149                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
12150                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
12151                 </fields>
12152                 <links>
12153                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
12154                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
12155                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
12156                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
12157                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12158                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
12159                 </links>
12160         </class>
12161
12162     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
12163                 <oils_persist:source_definition><![CDATA[
12164
12165         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
12166                 SELECT
12167                         cp.id as copy,
12168                         COUNT(circ.id),
12169                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12170                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
12171                 FROM
12172                         asset.copy cp
12173                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
12174                 GROUP BY 1, 3, 4
12175                 UNION ALL
12176                 SELECT
12177                         cp.id as copy,
12178                         COUNT(circ.id),
12179                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12180                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
12181                 FROM
12182                         asset.copy cp
12183                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
12184                 GROUP BY 1, 3, 4
12185                 UNION ALL
12186                 SELECT
12187                         id as copy,
12188                         circ_count,
12189                         -1 AS year,
12190                         false as is_renewal
12191                 FROM
12192                         extend_reporter.legacy_circ_count
12193         )x GROUP BY 1, 3, 4
12194
12195                 ]]></oils_persist:source_definition>
12196         <fields>
12197             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
12198             <field reporter:label="Count" name="count" reporter:datatype="int"/>
12199             <field reporter:label="Year" name="year" reporter:datatype="int"/>
12200             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
12201         </fields>
12202                 <links>
12203                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12204                 </links>
12205                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12206                         <actions>
12207                                 <retrieve/>
12208                         </actions>
12209                 </permacrud>
12210     </class>
12211
12212         <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">
12213                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
12214                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
12215                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
12216                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
12217                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
12218                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
12219                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
12220                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
12221                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
12222                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
12223                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
12224                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
12225                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
12226                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
12227                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
12228                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
12229                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
12230                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
12231                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
12232                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
12233                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
12234                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
12235                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
12236                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
12237                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
12238                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
12239                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
12240                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
12241                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
12242                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
12243                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
12244                 </fields>
12245                 <links>
12246                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
12247                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
12248                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
12249                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12250                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
12251                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12252                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12253                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
12254                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
12255                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
12256                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
12257                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
12258                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
12259                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
12260                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
12261                 </links>
12262         </class>
12263
12264     <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">
12265         <fields oils_persist:primary="id">
12266             <field reporter:label="Title" name="title" reporter:datatype="text"/>
12267             <field reporter:label="Author" name="author" reporter:datatype="text"/>
12268             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
12269             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12270             <field reporter:label="Price" name="price" reporter:datatype="money"/>
12271             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
12272             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
12273             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
12274             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12275             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
12276             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12277             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
12278             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
12279             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
12280             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12281             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12282             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
12283             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
12284             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
12285             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
12286             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
12287             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
12288             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12289             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
12290             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
12291             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
12292             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
12293             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
12294             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
12295             <field reporter:label="Status" name="status" reporter:datatype="link"/>
12296             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
12297             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
12298             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
12299             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
12300         </fields>
12301         <links>
12302             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12303             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12304             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12305             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12306             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
12307             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
12308             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
12309             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
12310         </links>
12311     </class>
12312
12313     <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">
12314         <fields oils_persist:primary="id">
12315             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12316             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12317             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12318             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12319         </fields>
12320         <links>
12321             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12322             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12323         </links>
12324     </class>
12325
12326     <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">
12327         <fields oils_persist:primary="owning_lib">
12328             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12329             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12330             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12331         </fields>
12332         <links>
12333             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12334         </links>
12335     </class>
12336
12337     <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">
12338         <fields oils_persist:primary="id">
12339             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12340             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12341             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12342             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12343             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12344         </fields>
12345         <links>
12346             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12347             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12348             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12349         </links>
12350     </class>
12351
12352     <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">
12353         <fields oils_persist:primary="circ_lib">
12354             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12355             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12356             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12357             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12358         </fields>
12359         <links>
12360             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12361             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12362         </links>
12363     </class>
12364
12365     <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">
12366         <fields oils_persist:primary="id">
12367             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12368             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12369             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12370             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12371             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12372         </fields>
12373         <links>
12374             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12375             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12376             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12377         </links>
12378     </class>
12379
12380     <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">
12381         <fields oils_persist:primary="home_ou">
12382             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12383             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12384             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12385             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12386         </fields>
12387         <links>
12388             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12389             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12390         </links>
12391     </class>
12392         <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">
12393                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
12394                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
12395                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
12396                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
12397                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
12398                 </fields>
12399                 <links>
12400                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12401                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
12402                 </links>
12403                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12404                         <actions>
12405                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12406                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
12407                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12408                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12409                         </actions>
12410                 </permacrud>
12411         </class>
12412         <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">
12413                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
12414                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
12415                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
12416                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
12417                 </fields>
12418                 <links>
12419                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
12420                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
12421                         </links>
12422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12423                 <actions>
12424                                 <create permission="ADMIN_ACQ_FUND_TAG">
12425                                         <context link="tag" field="owner"/>
12426                                 </create>
12427                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
12428                                         <context link="tag" field="owner"/>
12429                                 </retrieve>
12430                                 <update permission="ADMIN_ACQ_FUND_TAG">
12431                                         <context link="tag" field="owner"/>
12432                                 </update>
12433                                 <delete permission="ADMIN_ACQ_FUND_TAG">
12434                                         <context link="tag" field="owner"/>
12435                                 </delete>
12436                         </actions>
12437                 </permacrud>
12438         </class>
12439         <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">
12440                 <oils_persist:source_definition><![CDATA[
12441                 SELECT
12442                         poi.purchase_order AS purchase_order,
12443                         ii.invoice AS invoice,
12444                         NULL AS lineitem,
12445                         poi.id AS po_item,
12446                         NULL AS picklist
12447                 FROM
12448                         acq.po_item poi
12449                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
12450                 UNION SELECT
12451                         jub.purchase_order AS purchase_order,
12452                         ie.invoice AS invoice,
12453                         jub.id AS lineitem,
12454                         NULL AS po_item,
12455                         jub.picklist AS picklist
12456                 FROM
12457                         acq.lineitem jub
12458                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
12459                 UNION SELECT
12460                         ii.purchase_order AS purchase_order,
12461                         ii.invoice AS invoice,
12462                         NULL AS lineitem,
12463                         NULL AS po_item,
12464                         NULL AS picklist
12465                 FROM
12466                         acq.invoice_item ii
12467                 WHERE ii.po_item IS NULL
12468                 UNION SELECT
12469                         ie.purchase_order AS purchase_order,
12470                         ie.invoice AS invoice,
12471                         NULL AS lineitem,
12472                         NULL AS po_item,
12473                         NULL AS picklist
12474                 FROM
12475                         acq.invoice_entry ie
12476                 WHERE ie.lineitem IS NULL
12477                 UNION SELECT
12478                         NULL AS purchase_order,
12479                         NULL AS invoice,
12480                         jub.id AS lineitem,
12481                         NULL AS po_item,
12482                         jub.picklist AS picklist
12483                 FROM
12484                         acq.lineitem jub
12485                 WHERE jub.purchase_order IS NULL
12486                 ]]></oils_persist:source_definition>
12487                 <fields>
12488                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
12489                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
12490                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
12491                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
12492                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
12493                 </fields>
12494                 <links>
12495                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
12496                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
12497                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
12498                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
12499                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
12500                 </links>
12501         </class>
12502         <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">
12503                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
12504                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12505                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
12506                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
12507                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
12508                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
12509                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12510                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
12511                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
12512                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
12513                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
12514                 </fields>
12515                 <links>
12516                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
12517                 </links>
12518                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12519                         <actions>
12520                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12521                                 <retrieve/>
12522                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12523                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12524                         </actions>
12525                 </permacrud>
12526         </class>
12527
12528         <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">
12529                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
12530                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12531                         <field name="date_applied" reporter:datatype="timestamp"/>
12532                         <field name="org" reporter:datatype="org_unit"/>
12533                         <field name="original_value" reporter:datatype="text"/>
12534                         <field name="new_value" reporter:datatype="text"/>
12535                         <field name="field_name" reporter:datatype="link"/>
12536                 </fields>
12537                 <links>
12538                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
12539                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
12540                 </links>
12541                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12542                         <actions>
12543                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
12544                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
12545                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12546                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12547                         </actions>
12548                 </permacrud>
12549         </class>
12550         <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">
12551                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12552                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12553                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12554                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12555                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12556                 </fields>
12557                 <links>
12558                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12559                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
12560                 </links>
12561         </class>
12562         <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">
12563                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12564                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12565                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12566                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12567                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12568                 </fields>
12569                 <links>
12570                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12571                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
12572                 </links>
12573         </class>
12574         <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">
12575                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
12576                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
12577                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
12578                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
12579                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
12580                 </fields>
12581                 <links>
12582                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
12583                 </links>
12584                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12585                         <actions>
12586                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12587                                 <retrieve/>
12588                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12589                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12590                         </actions>
12591                 </permacrud>
12592         </class>
12593         <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">
12594                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
12595                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12596                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
12597                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
12598                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
12599                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
12600                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
12601                 </fields>
12602                 <links>
12603                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
12604                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
12605                 </links>
12606                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12607                         <actions>
12608                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12609                                 <retrieve/>
12610                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12611                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12612                         </actions>
12613                 </permacrud>
12614         </class>
12615         <class id="cctt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_tag_type" oils_persist:tablename="config.copy_tag_type" reporter:label="Copy Tag Types" oils_persist:field_safe="true">
12616                 <fields oils_persist:primary="code">
12617                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
12618                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
12619                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12620                 </fields>
12621                 <links>
12622                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12623                 </links>
12624                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12625                         <actions>
12626                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12627                                 <retrieve/>
12628                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12629                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12630                         </actions>
12631                 </permacrud>
12632         </class>
12633         <class id="acpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_tag" oils_persist:tablename="asset.copy_tag" reporter:label="Copy Tags" oils_persist:field_safe="true">
12634                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
12635                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12636                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
12637                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12638                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12639                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
12640                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
12641                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12642                 </fields>
12643                 <links>
12644                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
12645                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12646                 </links>
12647                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12648                         <actions>
12649                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
12650                                 <retrieve/>
12651                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
12652                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
12653                         </actions>
12654                 </permacrud>
12655         </class>
12656         <class id="acptcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_tag_copy_map" oils_persist:tablename="asset.copy_tag_copy_map" reporter:label="Copy Tag Copy Map" oils_persist:field_safe="true">
12657                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
12658                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12659                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
12660                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
12661                 </fields>
12662                 <links>
12663                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12664                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
12665                 </links>
12666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12667                         <actions>
12668                                 <create permission="UPDATE_COPY">
12669                     <context link="copy" field="circ_lib"/>
12670                 </create>
12671                                 <retrieve/>
12672                                 <update permission="UPDATE_COPY">
12673                     <context link="copy" field="circ_lib"/>
12674                 </update>
12675                                 <delete permission="UPDATE_COPY">
12676                     <context link="copy" field="circ_lib"/>
12677                 </delete>
12678                         </actions>
12679                 </permacrud>
12680         </class>
12681         <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">
12682         <oils_persist:source_definition><![CDATA[
12683         SELECT ahcm.target_copy AS id,count(*) AS count
12684          FROM
12685          action.hold_request ahr,
12686          action.hold_copy_map ahcm
12687          WHERE
12688          ahr.cancel_time IS NULL AND
12689          ahr.fulfillment_time IS NULL AND
12690          ahr.capture_time IS NULL AND
12691          ahr.id = ahcm.hold
12692          GROUP BY ahcm.target_copy
12693         ]]></oils_persist:source_definition>
12694         <fields oils_persist:primary="id">
12695             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12696             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
12697         </fields>
12698         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12699             <actions>
12700                <retrieve/>
12701             </actions>
12702         </permacrud>
12703         </class>
12704
12705         <class id="cwst" controller="open-ils.cstore open-ils.pcrud"
12706                 oils_obj:fieldmapper="config::workstation_setting_type" 
12707                 oils_persist:tablename="config.workstation_setting_type" 
12708                 reporter:label="Workstation Setting Type">
12709                 <fields oils_persist:primary="name">
12710                         <field name="name" reporter:datatype="text"/>
12711                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
12712                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
12713                         <field name="datatype" reporter:datatype="text"/>
12714                         <field name="fm_class" reporter:datatype="text"/>
12715                         <field name="grp" reporter:datatype="link"/>
12716                 </fields>
12717                 <links>
12718                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
12719                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
12720                 </links>
12721                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12722                         <actions>
12723                                 <create permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12724                                 <retrieve/>
12725                                 <update permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12726                                 <delete permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12727                         </actions>
12728                 </permacrud>
12729         </class>
12730
12731         <!-- no pcrud access is granted for now, because it's assumed these
12732                          setting values will be applied and retrived via the API. -->
12733         <class id="awss" 
12734                 controller="open-ils.cstore"
12735                 oils_obj:fieldmapper="actor::workstation_setting" 
12736                 oils_persist:tablename="actor.workstation_setting" 
12737                 reporter:label="Workstation Setting">
12738                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_setting_id_seq">
12739                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
12740                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
12741                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12742                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
12743                 </fields>
12744                 <links>
12745                         <link field="name" reltype="has_a" key="name" map="" class="cwst"/>
12746                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
12747                 </links>
12748         </class>
12749
12750         <!-- ********************************************************************************************************************* -->
12751 </IDL>
12752
12753 <!--
12754     vim:noet:ts=4:sw=4:
12755 -->