]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
b8b3651f5203f17988d6d1b6ff11197b7dad8074
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                 </fields>
98                 <links>
99                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
100                 </links>
101         </class>
102
103         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
104                 <fields>
105                         <field name="id" oils_persist:virtual="true" />
106                         <field name="children" oils_persist:virtual="true" />
107                         <field name="owner_doc" oils_persist:virtual="true" />
108                         <field name="intra_doc_id" oils_persist:virtual="true" />
109                         <field name="parent_node" oils_persist:virtual="true" />
110                         <field name="node_type" oils_persist:virtual="true" />
111                         <field name="namespace_uri" oils_persist:virtual="true" />
112                         <field name="name" oils_persist:virtual="true" />
113                         <field name="value" oils_persist:virtual="true" />
114                 </fields>
115         </class>
116
117         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
118                 <fields>
119                         <field name="title" oils_persist:virtual="true" />
120                         <field name="author" oils_persist:virtual="true" />
121                         <field name="doc_id" oils_persist:virtual="true" />
122                         <field name="doc_type" oils_persist:virtual="true" />
123                         <field name="pubdate" oils_persist:virtual="true" />
124                         <field name="isbn" oils_persist:virtual="true" />
125                         <field name="publisher" oils_persist:virtual="true" />
126                         <field name="tcn" oils_persist:virtual="true" />
127                         <field name="subject" oils_persist:virtual="true" />
128                         <field name="types_of_resource" oils_persist:virtual="true" />
129                         <field name="call_numbers" oils_persist:virtual="true" />
130                         <field name="edition" oils_persist:virtual="true" />
131                         <field name="online_loc" oils_persist:virtual="true" />
132                         <field name="synopsis" oils_persist:virtual="true" />
133                         <field name="physical_description" oils_persist:virtual="true" />
134                         <field name="toc" oils_persist:virtual="true" />
135                         <field name="copy_count" oils_persist:virtual="true" />
136                         <field name="series" oils_persist:virtual="true" />
137                         <field name="serials" oils_persist:virtual="true" />
138                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
139                 </fields>
140         </class>
141
142         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
143                 <fields>
144                         <field name="err_msg" oils_persist:virtual="true" />
145                         <field name="type" oils_persist:virtual="true" />
146                 </fields>
147         </class>
148
149         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
150                 <fields>
151                         <field name="err_msg" oils_persist:virtual="true" />
152                         <field name="type" oils_persist:virtual="true" />
153                 </fields>
154         </class>
155
156         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
157                 <fields oils_persist:primary="matchpoint">
158                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
159                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
160                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
164                 </links>
165         </class>
166
167         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
168         <!-- when the time is right, turn me into a view.  -->
169                 <fields>
170             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
171             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
172             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
173             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
174             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
175             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
176             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
179             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
180                 </fields>
181         </class>
182
183         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
184                 <fields>
185                         <field name="public_name" oils_persist:virtual="true" />
186                         <field name="target_url" oils_persist:virtual="true" />
187                         <field name="target_coverage" oils_persist:virtual="true" />
188                         <field name="target_embargo" oils_persist:virtual="true" />
189                 </fields>
190         </class>
191
192         <!-- Actually in the DB -->
193         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
194                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
195                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
196                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
197                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
198                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
199                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
200                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
201                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
202                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
203                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
204                 </fields>
205                 <links>
206                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
207                 </links>
208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
209                         <actions>
210                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
211                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
212                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
213                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
214                         </actions>
215                 </permacrud>
216         </class>
217
218         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
219                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
220                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
221                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
222                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
223                 </fields>
224                 <links>
225                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
226                 </links>
227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
228                         <actions>
229                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
230                     <context link="grp" field="owner"/>
231                 </create>
232                                 <retrieve/>
233                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
234                     <context link="grp" field="owner"/>
235                 </update>
236                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
237                     <context link="grp" field="owner"/>
238                 </delete>
239                         </actions>
240                 </permacrud>
241         </class>
242
243         <class  id="rrbs" 
244             controller="open-ils.cstore open-ils.pcrud" 
245             oils_obj:fieldmapper="rating::record_badge_score" 
246             oils_persist:tablename="rating.record_badge_score" 
247             reporter:label="Statistical Popularity Badge">
248                 <fields oils_persist:primary="id" 
249                 oils_persist:sequence="rating.record_badge_score_id_seq">
250                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
251                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
252                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
253                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
254                 </fields>
255         <links>
256             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
257             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
258         </links>
259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
260                         <actions>
261                                 <retrieve/>
262                         </actions>
263                 </permacrud>
264         </class>
265
266         <class  id="rp" 
267             controller="open-ils.cstore open-ils.pcrud" 
268             oils_obj:fieldmapper="rating::popularity_parameter" 
269             oils_persist:tablename="rating.popularity_parameter" 
270             reporter:label="Statistical Popularity Parameter">
271                 <fields oils_persist:primary="id" 
272                 oils_persist:sequence="rating.popularity_parameter_id_seq">
273                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
274                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
275                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
276                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
277                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
278                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
279                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
280                 </fields>
281                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
282                         <actions>
283                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
284                                 <retrieve/>
285                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
286                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
287                         </actions>
288                 </permacrud>
289         </class>
290
291         <class  id="rb" 
292             controller="open-ils.cstore open-ils.pcrud" 
293             oils_obj:fieldmapper="rating::badge" 
294             oils_persist:tablename="rating.badge" 
295             reporter:label="Statistical Popularity Badge">
296                 <fields oils_persist:primary="id" 
297                 oils_persist:sequence="rating.badge_id_seq">
298                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
299                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
301                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
302                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
303                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
304                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
305                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
306                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
307                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
308                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
309                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
310                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
311                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
312                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
313                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
314                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
315                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
316                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
317                 </fields>
318                 <links>
319                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
320                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
321                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
322                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
323                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
324                 </links>
325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
326                         <actions>
327                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
328                                 <retrieve/>
329                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
330                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
331                         </actions>
332                 </permacrud>
333         </class>
334
335         <class  id="vibtg" 
336             controller="open-ils.cstore open-ils.pcrud" 
337             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
338             oils_persist:tablename="vandelay.import_bib_trash_group" 
339             reporter:label="Import/Overlay Field Groups for Removal">
340                 <fields oils_persist:primary="id" 
341                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
342                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
343                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
344                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
345                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
346                 </fields>
347                 <links>
348                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
349                 </links>
350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
351                         <actions>
352                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
353                                 <retrieve/>
354                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
355                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                         </actions>
357                 </permacrud>
358         </class>
359
360
361         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
362                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
363                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
364                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
365                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
366                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
367                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
368                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
369                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
370                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
371                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
372                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
373                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
374                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
375                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
376                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
377                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
378                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
379                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
380                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
381                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
382                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
383                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
384                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
385                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
386                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
387                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
388                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
389                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
390                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
391                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
392                 </fields>
393                 <links>
394                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
395                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
396                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <create permission="CREATE_IMPORT_ITEM">
402                     <context link="definition" field="owner"/>
403                                 </create>
404                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
405                     <context link="definition" field="owner"/>
406                                 </retrieve>
407                                 <update permission="UPDATE_IMPORT_ITEM">
408                     <context link="definition" field="owner"/>
409                                 </update>
410                                 <delete permission="DELETE_IMPORT_ITEM">
411                     <context link="definition" field="owner"/>
412                                 </delete>
413                         </actions>
414                 </permacrud>
415         </class>
416
417         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
418                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
419                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
420                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
421                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
422                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
423                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
424                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
425                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
426                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
427                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
428                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
429                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
430                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
431                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
432                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
433                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
434                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
435                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
436                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
437                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
438                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
439                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
440                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
441                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
442                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
443                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
444                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
445                 </fields>
446                 <links>
447                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
448                 </links>
449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
450                         <actions>
451                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
452                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
453                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
454                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                         </actions>
456                 </permacrud>
457         </class>
458
459         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
460                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
461                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
462                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
463                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
464                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
465                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
466                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
467                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
468                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
469                 </fields>
470                 <links>
471                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
472                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
473                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
474                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
475                 </links>
476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
477                         <actions>
478                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
479                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
480                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
481                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
482                         </actions>
483                 </permacrud>
484         </class>
485
486         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
487                 <fields oils_persist:primary="code">
488                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
489                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
490                 </fields>
491                 <links>
492                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
493                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
494                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
495                 </links>
496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
497                         <actions>
498                                 <retrieve/>
499                         </actions>
500                 </permacrud>
501         </class>
502
503         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
504                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
505                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
506                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
507                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
508                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
509                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
510                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
511                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
512                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
513                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
514                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
515                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
516                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
517                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
518                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
519                 </fields>
520                 <links>
521                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
522                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
523                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
524                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
525             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
526             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
527             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
528                 </links>
529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
530                         <actions>
531                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
532                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
533                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
534                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
535                         </actions>
536                 </permacrud>
537         </class>
538
539         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
540                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
541                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
542                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
543                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
544                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
545                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
546                 </fields>
547                 <links/>
548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
549                         <actions>
550                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
551                 <retrieve/>
552                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
553                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
554                         </actions>
555                 </permacrud>
556         </class>
557
558         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
559                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
560                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
561                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
562                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
563                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
564                 </fields>
565                 <links>
566                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
567                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
568                 </links>
569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
570                         <actions>
571                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
572                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
573                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
574                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
575                         </actions>
576                 </permacrud>
577         </class>
578
579         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
580                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
581                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
582                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
583                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
584                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
585                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
586                 </fields>
587                 <links>
588                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
589                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
590                 </links>
591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
592                         <actions>
593                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
594                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
595                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
596                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
597                         </actions>
598                 </permacrud>
599         </class>
600
601         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
602                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
603                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
604                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
605                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
606                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
607                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
608                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
609                 </fields>
610                 <links>
611                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
612                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
613                 </links>
614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
615                         <actions>
616                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                         </actions>
621                 </permacrud>
622         </class>
623
624         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
625                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
626                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
627                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
628                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
629                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
630                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
631                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
632                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
633                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
634                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
635                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
636                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
637                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
638                 </fields>
639                 <links>
640                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
641                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
642                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
643             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
644             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
645                 </links>
646                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
647                         <actions>
648                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
649                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
650                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
651                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                         </actions>
653                 </permacrud>
654         </class>
655
656         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
657                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
658                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
659                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
660                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
661                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
662                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
663                 </fields>
664                 <links/>
665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
666                         <actions>
667                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
668                 <retrieve/>
669                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
670                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                         </actions>
672                 </permacrud>
673         </class>
674
675         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
676                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
677                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
678                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
679                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
680                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
681                 </fields>
682                 <links>
683                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
684                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
685                 </links>
686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687                         <actions>
688                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
689                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
690                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
691                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                         </actions>
693                 </permacrud>
694         </class>
695
696         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
697                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
698                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
699                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
700                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
701                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
702                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
703                 </fields>
704                 <links>
705                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
706                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
707                 </links>
708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
709                         <actions>
710                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
711                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
712                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
713                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                         </actions>
715                 </permacrud>
716         </class>
717
718         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
719                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
720                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
721                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
722                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
723                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
724                 </fields>
725                 <links>
726                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
727                 </links>
728                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
729                         <actions>
730                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
731                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
732                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
733                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                         </actions>
735                 </permacrud>
736         </class>
737
738         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
739                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
740                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
741                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
742                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
743                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
744                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
745                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
746                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
747             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
748                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
749                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
750                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
751                 </fields>
752                 <links>
753                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
754                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
755                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
756                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
757                 </links>
758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
759                         <actions>
760                                 <create permission="ADMIN_IMPORT_MATCH_SET">
761                     <context link="match_set" field="owner"/>
762                                 </create>
763                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
764                     <context link="match_set" field="owner"/>
765                                 </retrieve>
766                                 <update permission="ADMIN_IMPORT_MATCH_SET">
767                     <context link="match_set" field="owner"/>
768                                 </update>
769                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
770                     <context link="match_set" field="owner"/>
771                                 </delete>
772                         </actions>
773                 </permacrud>
774         </class>
775
776         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
777                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
778                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
779                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
780                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
781                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
782                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
783                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
784                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
785                 </fields>
786                 <links>
787                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
788                 </links>
789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
790                         <actions>
791                                 <create permission="ADMIN_IMPORT_MATCH_SET">
792                     <context link="match_set" field="owner"/>
793                                 </create>
794                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
795                     <context link="match_set" field="owner"/>
796                                 </retrieve>
797                                 <update permission="ADMIN_IMPORT_MATCH_SET">
798                     <context link="match_set" field="owner"/>
799                                 </update>
800                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
801                     <context link="match_set" field="owner"/>
802                                 </delete>
803                         </actions>
804                 </permacrud>
805         </class>
806
807         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
808                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
809                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
810                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
811                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
812                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
813                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
814                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
815                 </fields>
816                 <links>
817                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
818                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
819                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
820                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
821                 </links>
822         </class>
823
824     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
825         <fields oils_persist:primary="name">
826             <field reporter:label="Name" name="name" reporter:datatype="text"/>
827             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
828             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
829             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
830         </fields>
831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
832             <actions>
833                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
834                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
835                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
836                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
837             </actions>
838         </permacrud>
839     </class>
840
841     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
842         <fields oils_persist:primary="id">
843             <field reporter:label="ID" name="id" reporter:datatype="id"/>
844             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
845             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
846             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
847             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
848         </fields>
849         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
850             <actions>
851                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
852                 <retrieve/>
853                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
854                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
855             </actions>
856         </permacrud>
857     </class>
858
859         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
860                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
861                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
862                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
863                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
864                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
865                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
866                 </fields>
867                 <links>
868                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
869                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
870                 </links>
871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
872             <actions>
873                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
874                 <retrieve/>
875                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
876                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
877             </actions>
878         </permacrud>
879         </class>
880
881         <class id="cmrcfmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_format" oils_persist:tablename="config.marc_format" reporter:label="MARC Formats" oils_persist:field_safe="true">
882                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
883                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
884                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
885                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
886         </fields>
887         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
888             <actions>
889                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
890                 <retrieve/>
891                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
892                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
893             </actions>
894         </permacrud>
895         </class>
896
897         <class id="cmrcfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_field" oils_persist:tablename="config.marc_field" reporter:label="MARC Fields" oils_persist:field_safe="true">
898                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
899                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
900                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
901                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
902                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
903                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
904                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
905                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
906                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
907                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
908                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
909                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
910         </fields>
911                 <links>
912                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
913                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
914         </links>
915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
916             <actions>
917                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
918                 <retrieve/>
919                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
920                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
921             </actions>
922         </permacrud>
923         </class>
924
925         <class id="cmrcsubfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_subfield" oils_persist:tablename="config.marc_subfield" reporter:label="MARC Subfields" oils_persist:subfield_safe="true">
926                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
927                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
928                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
929                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
930                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
931                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
932                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
933                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
934                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
935                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
936                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
937         </fields>
938                 <links>
939                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
940                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
941         </links>
942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
943             <actions>
944                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
945                 <retrieve/>
946                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
947                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
948             </actions>
949         </permacrud>
950         </class>
951
952         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
953                 <fields oils_persist:primary="name">
954                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
955                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
956                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
957                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
958                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
959                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
960                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
961                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
962                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
963                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
964                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
965                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
966                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
967                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
968                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
969                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
970                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
971                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
972                 </fields>
973                 <links>
974                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
975                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
976                 </links>
977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
978             <actions>
979                 <create permission="ADMIN_SVF" global_required="true"/>
980                 <retrieve/>
981                 <update permission="ADMIN_SVF" global_required="true"/>
982                 <delete permission="ADMIN_SVF" global_required="true"/>
983             </actions>
984         </permacrud>
985         </class>
986
987         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
988                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
989                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
990                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
991                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
992             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
993                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
994                 </fields>
995                 <links/>
996         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
997             <actions>
998                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
999                 <retrieve/>
1000                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1001                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1002             </actions>
1003         </permacrud>
1004         </class>
1005
1006         <class id="ccraed" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::composite_attr_entry_definition" oils_persist:tablename="config.composite_attr_entry_definition" reporter:label="Composite Attribute Definitions" oils_persist:field_safe="true">
1007                 <fields oils_persist:primary="coded_value">
1008                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1009                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1010                 </fields>
1011                 <links>
1012                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1013                 </links>
1014         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1015             <actions>
1016                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1017                 <retrieve/>
1018                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1019                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1020             </actions>
1021         </permacrud>
1022         </class>
1023
1024         <class id="murav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::uncontrolled_record_attr_value" oils_persist:tablename="metabib.uncontrolled_record_attr_value" reporter:label="Uncontrolled Record Attribute Values" oils_persist:field_safe="true">
1025                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1026                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1027                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1028                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1029                 </fields>
1030                 <links>
1031                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1032                 </links>
1033         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1034             <actions>
1035                 <retrieve/>
1036             </actions>
1037         </permacrud>
1038         </class>
1039
1040
1041         <class id="mrs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_sorter" oils_persist:tablename="metabib.record_sorter" reporter:label="Record Sort Values" oils_persist:field_safe="true">
1042                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1043                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1044                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1045                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1046                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1047                 </fields>
1048                 <links>
1049                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1050                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1051                 </links>
1052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1053             <actions>
1054                 <retrieve/>
1055             </actions>
1056         </permacrud>
1057         </class>
1058
1059
1060         <class id="mravl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_vector_list" oils_persist:tablename="metabib.record_attr_vector_list" reporter:label="MVF Record Attribute Vectors" oils_persist:field_safe="true">
1061                 <fields oils_persist:primary="source">
1062                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1063                         <field reporter:label="Vector" name="vlist" reporter:datatype="text"  oils_obj:required="true"/> <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
1064                 </fields>
1065                 <links>
1066                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1067                 </links>
1068         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1069             <actions>
1070                 <retrieve/>
1071             </actions>
1072         </permacrud>
1073         </class>
1074
1075         <class id="mraf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_flat" oils_persist:tablename="metabib.record_attr_flat" reporter:label="MVF Record Attribute Flat List" oils_persist:field_safe="true">
1076                 <fields>
1077                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1078                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1079                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1080                 </fields>
1081                 <links>
1082                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1083                 </links>
1084         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1085             <actions>
1086                 <retrieve/>
1087             </actions>
1088         </permacrud>
1089         </class>
1090
1091         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true" oils_persist:readonly="true">
1092                 <fields oils_persist:primary="id">
1093                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1094                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1095                 </fields>
1096                 <links>
1097                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1098                 </links>
1099         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1100             <actions>
1101                 <retrieve/>
1102             </actions>
1103         </permacrud>
1104         </class>
1105
1106         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
1107                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1108                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1109                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1110                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1111                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1112                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1113                 </fields>
1114                 <links>
1115                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1116                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1117                 </links>
1118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1119             <actions>
1120                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1121                 <retrieve/>
1122                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1123                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1124             </actions>
1125         </permacrud>
1126         </class>
1127
1128         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
1129                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1130                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1131                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1132                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1133                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1134                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1135                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1136                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1137             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1138             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1139             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1140                 </fields>
1141                 <links>
1142                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1143                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1144                 </links>
1145         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1146             <actions>
1147                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1148                 <retrieve/>
1149                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1150                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1151             </actions>
1152         </permacrud>
1153         </class>
1154
1155         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
1156                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1157                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1158                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1159                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1160                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1161                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1162                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1163                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1164                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1165                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1166                 </fields>
1167                 <links>
1168                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1169                 </links>
1170         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1171             <actions>
1172                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1173                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1174                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1175                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1176             </actions>
1177         </permacrud>
1178         </class>
1179
1180     <class id="czs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_source" oils_persist:tablename="config.z3950_source" reporter:label="Z39.50 Source">
1181         <fields oils_persist:primary="name">
1182             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1183             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1184             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1185             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1186             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1187             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1188             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1189             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1190             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1191             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1192         </fields>
1193         <links>
1194             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1195             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1196         </links>
1197         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1198             <actions>
1199                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1200                 <retrieve/>
1201                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1202                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1203             </actions>
1204         </permacrud>
1205     </class>
1206
1207     <class id="cza" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
1208         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1209             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1210             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1211             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1212             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1213             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1214             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1215             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1216         </fields>
1217         <links>
1218             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1219         </links>
1220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1221             <actions>
1222                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1223                 <retrieve/>
1224                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1225                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1226             </actions>
1227         </permacrud>
1228     </class>
1229
1230     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1231                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1232                         oils_persist:tablename="config.z3950_index_field_map" 
1233                         reporter:label="Z39.50 Index Field Map">
1234         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1235             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1236             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1237             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1238             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1239             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1240             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1241         </fields>
1242         <links>
1243             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1244             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1245             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1246         </links>
1247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1248             <actions>
1249                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1250                 <retrieve/>
1251                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1252                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1253             </actions>
1254         </permacrud>
1255     </class>
1256
1257
1258         <class id="ateo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_output" oils_persist:tablename="action_trigger.event_output" reporter:label="Event Output">
1259                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1260                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1261                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1262                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1263                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1264                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1265                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1266                 </fields>
1267                 <links>
1268             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1269             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1270                 </links>
1271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1272                         <actions>
1273                                 <retrieve/>
1274                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1275                         </actions>
1276                 </permacrud>
1277         </class>
1278
1279         <class id="ath" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::hook" oils_persist:tablename="action_trigger.hook" reporter:label="Trigger Hook Point">
1280                 <fields oils_persist:primary="key">
1281                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1282                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1283                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1284                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1285                 </fields>
1286                 <links/>
1287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1288                         <actions>
1289                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1290                                 <retrieve/>
1291                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1292                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1293                         </actions>
1294                 </permacrud>
1295         </class>
1296
1297         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1298                 <fields oils_persist:primary="module">
1299                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1300                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1301                 </fields>
1302                 <links/>
1303         </class>
1304
1305         <class id="atval" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::validator" oils_persist:tablename="action_trigger.validator" reporter:label="Trigger Condition Validator">
1306                 <fields oils_persist:primary="module">
1307                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1308                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1309                 </fields>
1310                 <links/>
1311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1312                         <actions>
1313                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1314                                 <retrieve/>
1315                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1316                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1317                         </actions>
1318                 </permacrud>
1319         </class>
1320
1321         <class id="atreact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::reactor" oils_persist:tablename="action_trigger.reactor" reporter:label="Trigger Event Reactor">
1322                 <fields oils_persist:primary="module">
1323                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1324                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1325                 </fields>
1326                 <links/>
1327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1328                         <actions>
1329                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1330                                 <retrieve/>
1331                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1332                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1333                         </actions>
1334                 </permacrud>
1335         </class>
1336
1337         <class id="atclean" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::cleanup" oils_persist:tablename="action_trigger.cleanup" reporter:label="Trigger Event Cleanup">
1338                 <fields oils_persist:primary="module">
1339                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1340                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1341                 </fields>
1342                 <links/>
1343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1344                         <actions>
1345                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1346                                 <retrieve/>
1347                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1348                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1349                         </actions>
1350                 </permacrud>
1351         </class>
1352
1353         <class id="atenv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::environment" oils_persist:tablename="action_trigger.environment" reporter:label="Trigger Event Environment Entry">
1354                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1355                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1356                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1357                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1358                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1359                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1360                 </fields>
1361                 <links>
1362                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1363                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1364                 </links>
1365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1366                         <actions>
1367                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1368                     <context link="event_def" field="owner"/>
1369                 </create>
1370                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1371                     <context link="event_def" field="owner"/>
1372                 </retrieve>
1373                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1374                     <context link="event_def" field="owner"/>
1375                 </update>
1376                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1377                     <context link="event_def" field="owner"/>
1378                 </delete>
1379                         </actions>
1380                 </permacrud>
1381         </class>
1382
1383         <class id="atevdef" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_definition" oils_persist:tablename="action_trigger.event_definition" reporter:label="Trigger Event Definition">
1384                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1385                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1386                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1387                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1388                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1389                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1390                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1391                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1392                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1393                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1394                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1395                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1396                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1397                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1398                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1399                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1400                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1401                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1402                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1403                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1404                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1405                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1406                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1407                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1408                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1409                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1410                 </fields>
1411                 <links>
1412                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1413                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1414                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1415                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1416                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1417                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1418                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1419                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1420                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1421                 </links>
1422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1423                         <actions>
1424                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1425                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1426                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1427                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1428                         </actions>
1429                 </permacrud>
1430         </class>
1431
1432         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1433                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1434                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1435                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1436                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1437                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1438                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1439                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1440                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1441                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1442                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1443                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1444                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1445                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1446                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1447                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1448                 </fields>
1449                 <links>
1450                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1451                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1452                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1453                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1454                 </links>
1455         </class>
1456
1457         <class id="atevparam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_param" oils_persist:tablename="action_trigger.event_params" reporter:label="Trigger Event Parameter">
1458                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1459                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1460                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1461                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1462                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1463                 </fields>
1464                 <links>
1465                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1466                 </links>
1467                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1468                         <actions>
1469                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1470                     <context link="event_def" field="owner"/>
1471                 </create>
1472                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1473                     <context link="event_def" field="owner"/>
1474                 </retrieve>
1475                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1476                     <context link="event_def" field="owner"/>
1477                 </update>
1478                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1479                     <context link="event_def" field="owner"/>
1480                 </delete>
1481                         </actions>
1482                 </permacrud>
1483         </class>
1484
1485         <class id="atul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::user_log" reporter:label="Action Trigger User Log" oils_persist:readonly="true">
1486                 <oils_persist:source_definition><![CDATA[
1487                 SELECT  atevdef.hook,
1488                         atevdef.name,
1489                         atevdef.reactor,
1490                         atev.id,
1491                         atev.event_def,
1492                         atev.add_time,
1493                         atev.run_time,
1494                         atev.start_time,
1495                         atev.update_time,
1496                         atev.complete_time,
1497                         atev.update_process,
1498                         atev.state,
1499                         atev.user_data,
1500                         atev.template_output,
1501                         atev.error_output,
1502                         atev.async_output,
1503                         targ_circ.id AS target_circ,
1504                         targ_ahr.id AS target_hold,
1505                         COALESCE(
1506                                 targ_circ.circ_lib,
1507                                 targ_ahr.pickup_lib
1508                         ) AS perm_lib
1509                 FROM action_trigger.event atev
1510                 JOIN action_trigger.event_definition atevdef ON
1511                         (atevdef.id = atev.event_def)
1512                 JOIN action_trigger.hook ath ON
1513                         (ath.key = atevdef.hook)
1514                 LEFT JOIN action.circulation targ_circ ON
1515                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1516                 LEFT JOIN action.hold_request targ_ahr ON
1517                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1518                 WHERE atev.add_time > NOW() - (SELECT MIN(value) FROM (
1519                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1520                                 'circ.staff.max_visible_event_age',
1521                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1522                         ) UNION
1523                         SELECT '1000 YEARS'::INTERVAL AS value
1524                 ) ous)
1525                 ]]></oils_persist:source_definition>
1526                 <fields oils_persist:primary="id">
1527                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1528                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1529                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1530                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1531                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1532                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1533                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1534                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1535                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1536                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1537                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1538                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1539                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1540                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1541                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1542                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1543                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1544                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1545                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1546                 </fields>
1547                 <links>
1548                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1549                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1550                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1551                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1552                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1553                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1554                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1555                 </links>
1556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1557                         <actions>
1558                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1559                         </actions>
1560                 </permacrud>
1561         </class>
1562
1563         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1564                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1565                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1566                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1567                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1568                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1569                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1570                 </fields>
1571                 <links>
1572                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1573                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1574                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1575                 </links>
1576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1577                         <actions>
1578                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1579                         </actions>
1580                 </permacrud>
1581         </class>
1582
1583         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
1584                 <fields oils_persist:primary="code">
1585                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1586                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1587                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1588                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1589                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1590                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1591                 </fields>
1592                 <links/>
1593         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1594             <actions>
1595                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1596                 <retrieve/>
1597                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1598                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1599             </actions>
1600         </permacrud>
1601         </class>
1602
1603         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
1604                 <fields oils_persist:primary="code">
1605                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1606                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1607                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1608                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1609                 </fields>
1610                 <links/>
1611         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1612             <actions>
1613                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1614                 <retrieve/>
1615                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1616                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1617             </actions>
1618         </permacrud>
1619         </class>
1620
1621         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
1622                 <fields oils_persist:primary="code">
1623                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1624                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1625                 </fields>
1626                 <links/>
1627         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1628             <actions>
1629                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1630                 <retrieve/>
1631                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1632                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1633             </actions>
1634         </permacrud>
1635         </class>
1636
1637         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
1638                 <fields oils_persist:primary="code">
1639                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1640                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1641                 </fields>
1642                 <links/>
1643         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1644             <actions>
1645                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1646                 <retrieve/>
1647                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1648                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1649             </actions>
1650         </permacrud>
1651         </class>
1652
1653         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
1654                 <fields oils_persist:primary="code">
1655                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1656                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1657                 </fields>
1658                 <links/>
1659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1660             <actions>
1661                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1662                 <retrieve/>
1663                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1664                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1665             </actions>
1666         </permacrud>
1667         </class>
1668
1669         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1670                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1671                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1672                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1673                 </fields>
1674                 <links/>
1675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1676             <actions>
1677                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1678                 <retrieve/>
1679                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1680                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1681             </actions>
1682         </permacrud>
1683         </class>
1684
1685         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1686                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1687                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1688                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1689                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1690                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1691                 </fields>
1692         <links>
1693             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1694             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1695             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1696         </links>
1697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1698             <actions>
1699                 <create permission="UPDATE_COPY">
1700                     <context link="target_copy" field="circ_lib"/>
1701                 </create>
1702                 <retrieve/>
1703                 <update permission="UPDATE_COPY">
1704                     <context link="target_copy" field="circ_lib"/>
1705                 </update>
1706                 <delete permission="UPDATE_COPY">
1707                     <context link="target_copy" field="circ_lib"/>
1708                 </delete>
1709             </actions>
1710         </permacrud>
1711         </class>
1712
1713         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
1714                 <fields oils_persist:primary="code">
1715                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1716                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1717                 </fields>
1718                 <links/>
1719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1720             <actions>
1721                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1722                 <retrieve/>
1723                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1724                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1725             </actions>
1726         </permacrud>
1727         </class>
1728
1729         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
1730                 <fields oils_persist:primary="code">
1731                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1732                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1733                 </fields>
1734                 <links/>
1735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1736             <actions>
1737                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1738                 <retrieve/>
1739                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1740                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1741             </actions>
1742         </permacrud>
1743         </class>
1744
1745         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
1746                 <fields oils_persist:primary="code">
1747                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1748                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1749                 </fields>
1750                 <links/>
1751         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1752             <actions>
1753                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1754                 <retrieve/>
1755                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1756                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1757             </actions>
1758         </permacrud>
1759         </class>
1760
1761     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1762         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1763             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1764             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1765             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1766             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1767             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1768             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1769             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1770             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1771             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1772             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1773             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1774             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1775             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1776             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1777             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1778             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1779             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1780         </fields>
1781         <links/>
1782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1783             <actions>
1784                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1785                 <retrieve/>
1786                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1787                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1788             </actions>
1789         </permacrud>
1790     </class>
1791
1792     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1793         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1794             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1795             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1796             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1797             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1798             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1799             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1800             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1801             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1802             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1803             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1804             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1805             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1806             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1807             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1808             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1809             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1810             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1811             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1812             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1813         </fields>
1814         <links/>
1815         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1816             <actions>
1817                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1818                 <retrieve/>
1819                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1820                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1821             </actions>
1822         </permacrud>
1823     </class>
1824
1825     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1826         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1827             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1828             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1829             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1830             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1831             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1832         </fields>
1833         <links>
1834             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1835             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1836             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1837         </links>
1838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1839             <actions>
1840                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1841                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1842                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1843                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1844             </actions>
1845         </permacrud>
1846     </class>
1847
1848         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
1849                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1850                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1851                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1852                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1853                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1854                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1855                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1856                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1857                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1858                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1859                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1860                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1861                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1862                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1863                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1864                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1865                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1866             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1867                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1868                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1869                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1870                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1871                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1872                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1873                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1874                 </fields>
1875                 <links>
1876                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1877                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1878                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1879                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1880                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1881                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1882                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1883                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1884                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1885                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1886                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1887                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1888                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1889             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1890                 </links>
1891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1892             <actions>
1893                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1894                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1895                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1896                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1897             </actions>
1898         </permacrud>
1899         </class>
1900
1901         <class id="ccmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_matchpoint" oils_persist:tablename="config.circ_matrix_matchpoint" reporter:label="Circulation Matrix Matchpoint">
1902                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1903                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1904                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1905                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1906                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1907                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1908                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1909                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1910                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1911                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1912                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1913                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1914                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1915                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1916                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1917                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1918             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1919                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1920                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1921             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1922                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1923                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1924                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1925                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1926             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1927             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1928             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1929                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1930                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1931                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1932                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1933                 </fields>
1934                 <links>
1935                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1936                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1937                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1938                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1939                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1940                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1941                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1942                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1943                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1944                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1945                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1946                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1947                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1948                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1949             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1950                 </links>
1951         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1952             <actions>
1953                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1954                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1955                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1956                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1957             </actions>
1958         </permacrud>
1959         </class>
1960
1961     <class id="cclg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_group" oils_persist:tablename="config.circ_limit_group" reporter:label="Circulation Limit Group">
1962         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1963             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1964             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1965             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1966         </fields>
1967         <links/>
1968         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1969             <actions>
1970                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1971                 <retrieve/>
1972                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1973                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1974             </actions>
1975         </permacrud>
1976     </class>
1977
1978     <class id="ccls" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set" oils_persist:tablename="config.circ_limit_set" reporter:label="Circulation Limit Set">
1979         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1980             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1981             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1982             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1983             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1984             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1985             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1986             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1987         </fields>
1988         <links>
1989             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1990         </links>
1991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1992             <actions>
1993                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1994                 <retrieve/>
1995                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1996                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1997             </actions>
1998         </permacrud>
1999     </class>
2000
2001     <class id="ccmlsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_limit_set_map" oils_persist:tablename="config.circ_matrix_limit_set_map" reporter:label="Circulation Matrix Limit Set Map">
2002         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2003             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2004             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2005             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2006             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2007             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2008         </fields>
2009         <links>
2010             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2011             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2012         </links>
2013         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2014             <actions>
2015                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2016                     <context link="matchpoint" field="org_unit"/>
2017                 </create>
2018                 <retrieve/>
2019                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2020                     <context link="matchpoint" field="org_unit"/>
2021                 </update>
2022                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2023                     <context link="matchpoint" field="org_unit"/>
2024                 </delete>
2025             </actions>
2026         </permacrud>
2027     </class>
2028
2029     <class id="cclscmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_circ_mod_map" oils_persist:tablename="config.circ_limit_set_circ_mod_map" reporter:label="Circulation Limit Set Circ Mod Map">
2030         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2031             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2032             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2033             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2034         </fields>
2035         <links>
2036             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2037             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2038         </links>
2039         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2040             <actions>
2041                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2042                     <context link="limit_set" field="owning_lib"/>
2043                 </create>
2044                 <retrieve/>
2045                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2046                     <context link="limit_set" field="owning_lib"/>
2047                 </update>
2048                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2049                     <context link="limit_set" field="owning_lib"/>
2050                 </delete>
2051             </actions>
2052         </permacrud>
2053     </class>
2054     <class id="cclsacpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_copy_loc_map" oils_persist:tablename="config.circ_limit_set_copy_loc_map" reporter:label="Circulation Limit Set Copy Location Map">
2055         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2056             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2057             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2058             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2059         </fields>
2060         <links>
2061             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2062             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2063         </links>
2064         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2065             <actions>
2066                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2067                     <context link="limit_set" field="owning_lib"/>
2068                 </create>
2069                 <retrieve/>
2070                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2071                     <context link="limit_set" field="owning_lib"/>
2072                 </update>
2073                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2074                     <context link="limit_set" field="owning_lib"/>
2075                 </delete>
2076             </actions>
2077         </permacrud>
2078     </class>
2079
2080     <class id="cclsgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_group_map" oils_persist:tablename="config.circ_limit_set_group_map" reporter:label="Circulation Limit Set Group Map">
2081         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2082             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2083             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2084             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2085             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2086         </fields>
2087         <links>
2088             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2089             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2090         </links>
2091         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2092             <actions>
2093                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2094                     <context link="limit_set" field="owning_lib"/>
2095                 </create>
2096                 <retrieve/>
2097                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2098                     <context link="limit_set" field="owning_lib"/>
2099                 </update>
2100                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2101                     <context link="limit_set" field="owning_lib"/>
2102                 </delete>
2103             </actions>
2104         </permacrud>
2105     </class>
2106
2107         <class id="cit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::identification_type" oils_persist:tablename="config.identification_type" reporter:label="Identification Type">
2108                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2109                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2110                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2111                 </fields>
2112                 <links/>
2113         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2114             <actions>
2115                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2116                 <retrieve/>
2117                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2118                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2119             </actions>
2120         </permacrud>
2121         </class>
2122
2123         <class id="asvq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_question" oils_persist:tablename="action.survey_question" reporter:label="User Survey Question">
2124                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2125                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2126                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2127                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2128                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2129                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2130                 </fields>
2131                 <links>
2132                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2133                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2134                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2135                 </links>
2136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2137             <actions>
2138                 <create permission="ADMIN_SURVEY">
2139                     <context link="survey" field="owner"/>
2140                 </create>
2141                 <retrieve/>
2142                 <update permission="ADMIN_SURVEY">
2143                     <context link="survey" field="owner"/>
2144                 </update>
2145                 <delete permission="ADMIN_SURVEY">
2146                     <context link="survey" field="owner"/>
2147                 </delete>
2148             </actions>
2149         </permacrud>
2150         </class>
2151         <class id="mbts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
2152                 <fields oils_persist:primary="id" oils_persist:sequence="">
2153                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2154                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2155                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2156                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2157                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2158                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2159                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2160                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2161                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2162                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2163                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2164                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2165                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2166                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2167                 </fields>
2168                 <links>
2169                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2170                 </links>
2171                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2172                         <actions>
2173                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2174                                         <context link="usr" field="home_ou" />
2175                                 </retrieve>
2176                         </actions>
2177                 </permacrud>
2178         </class>
2179         <class id="mbtslv" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary_location_view" oils_persist:tablename="money.billable_xact_summary_location_view" reporter:label="Billable Transaction Summary with Billing Location" oils_persist:readonly="true" reporter:core="true">
2180                 <fields oils_persist:primary="id" oils_persist:sequence="">
2181                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2182                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2183                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2184                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2185                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2186                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2187                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2188                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2189                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2190                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2191                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2192                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2193                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2194                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2195                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2196                 </fields>
2197                 <links>
2198                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2199                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2200                 </links>
2201         </class>
2202         <class id="aum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message" oils_persist:tablename="actor.usr_message" reporter:label="User Message">
2203                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2204                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2205                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2206                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2207                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2208                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2209                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2210                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2211                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2212                 </fields>
2213                 <links>
2214                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2215                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2216                 </links>
2217                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2218                         <actions> <!-- created magically, so no create action -->
2219                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2220                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2221                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2222                         </actions>
2223                 </permacrud>
2224         </class>
2225         <class id="auml" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message_limited" oils_persist:tablename="actor.usr_message_limited" reporter:label="User Message (Limited Access)">
2226                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2227                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2228                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2229                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2230                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2231                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2232                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2233                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2234                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2235                 </fields>
2236                 <links>
2237                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2238                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2239                 </links>
2240                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2241                         <actions> <!-- created magically, so no create action -->
2242                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2243                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2244                         </actions>
2245                 </permacrud>
2246         </class>
2247         <class id="aun" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
2248                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2249                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2250                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2251                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2252                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2253                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2254                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2255                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2256                 </fields>
2257                 <links>
2258                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2259                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2260                 </links>
2261         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2262             <actions>
2263                 <create permission="UPDATE_USER" context_field="owner">
2264                     <context link="usr" field="home_ou"/>
2265                 </create>
2266                                 <!-- note: public notes are still accessible via API -->
2267                 <retrieve permission="UPDATE_USER">
2268                     <context link="usr" field="home_ou"/>
2269                                 </retrieve>
2270                 <update permission="UPDATE_USER">
2271                     <context link="usr" field="home_ou"/>
2272                                 </update>
2273                 <delete permission="UPDATE_USER">
2274                     <context link="usr" field="home_ou"/>
2275                                 </delete>
2276             </actions>
2277         </permacrud>
2278         </class>
2279         <class id="aupr" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_password_reset" oils_persist:tablename="actor.usr_password_reset" reporter:label="User password reset requests">
2280                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2281                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2282                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2283                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2284                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2285                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2286                 </fields>
2287                 <links>
2288                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2289                 </links>
2290         </class>
2291         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2292                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2293                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2294                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2295                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2296                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2297                 </fields>
2298                 <links>
2299                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2300                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2301                 </links>
2302         </class>
2303         <class id="mafe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::author_field_entry" oils_persist:tablename="metabib.author_field_entry" reporter:label="Author Field Entry">
2304                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2305                         <field name="field" reporter:datatype="link"/>
2306                         <field name="id" reporter:datatype="id" />
2307                         <field name="source" reporter:datatype="link"/>
2308                         <field name="value" reporter:datatype="text"/>
2309                 </fields>
2310                 <links>
2311                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2312                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2313                 </links>
2314         </class>
2315         <class id="aihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
2316                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2317                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2318                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2319                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2320                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2321                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2322                 </fields>
2323                 <links>
2324                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2325                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2326                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2327                 </links>
2328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2329                         <actions>
2330                                 <retrieve/>
2331                         </actions>
2332                 </permacrud>
2333         </class>
2334         <class id="ancihu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
2335                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2336                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2337                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2338                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2339                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2340                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2341                 </fields>
2342                 <links>
2343                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2344                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2345                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2346                 </links>
2347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2348                         <actions>
2349                                 <retrieve/>
2350                         </actions>
2351                 </permacrud>
2352         </class>
2353         <class id="atc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::transit_copy" oils_persist:tablename="action.transit_copy" reporter:core="true" reporter:label="Copy Transit">
2354                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2355                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2356                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2357                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2358                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2359                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2360                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2361                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2362                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2363                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2364                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2365                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2366                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2367                 </fields>
2368                 <links>
2369                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2370                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2371                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2372                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2373                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2374                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2375                 </links>
2376         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2377             <actions>
2378                 <create permission="TRANSIT_COPY" context_field="owner">
2379                     <context link="target_copy" field="circ_lib"/>
2380                 </create>
2381                 <retrieve/>
2382                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2383                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2384             </actions>
2385         </permacrud>
2386         </class>
2387         <class id="asvr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_response" oils_persist:tablename="action.survey_response" reporter:label="Survey Response">
2388                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2389                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2390                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2391                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2392                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2393                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2394                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2395                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2396                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2397                 </fields>
2398                 <links>
2399                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2400                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2401                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2402                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2403                 </links>
2404         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2405             <actions>
2406                 <create permission="ADMIN_SURVEY">
2407                     <context link="survey" field="owner"/>
2408                 </create>
2409                 <retrieve permission="VIEW_USER">
2410                     <context link="usr" field="home_ou"/>
2411                 </retrieve>
2412                 <update permission="ADMIN_SURVEY">
2413                     <context link="survey" field="owner"/>
2414                 </update>
2415                 <delete permission="ADMIN_SURVEY">
2416                     <context link="survey" field="owner"/>
2417                 </delete>
2418             </actions>
2419         </permacrud>
2420         </class>
2421         <class id="ccbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2422                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2423                         <field name="bucket" />
2424                         <field name="id" reporter:datatype="id" />
2425                         <field name="target_copy" reporter:datatype="link"/>
2426                         <field name="create_time" reporter:datatype="timestamp" />
2427                         <field name="pos" reporter:datatype="int" />
2428                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2429                 </fields>
2430                 <links>
2431                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2432                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2433             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2434                 </links>
2435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2436                         <actions>
2437                                 <retrieve permission="ADMIN_COPY_BUCKET">
2438                     <context link="bucket" owning_lib="owning_lib"/>
2439                 </retrieve>
2440             </actions>
2441         </permacrud>
2442         </class>
2443         <class id="ccbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item_note" oils_persist:tablename="container.copy_bucket_item_note" reporter:label="Copy Bucket Item Note">
2444                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2445                         <field name="id" reporter:datatype="id" />
2446                         <field name="item" reporter:datatype="link"/>
2447                         <field name="note" reporter:datatype="text" />
2448                 </fields>
2449                 <links>
2450                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2451                 </links>
2452         </class>
2453
2454         <class id="acs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set" oils_persist:tablename="authority.control_set" reporter:label="Authority Control Set" oils_persist:field_safe="true">
2455                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2456                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2457                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2458                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2459                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2460                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2461                 </fields>
2462                 <links>
2463                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2464                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2465                 </links>
2466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2467                         <actions>
2468                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2469                                 <retrieve/>
2470                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2471                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2472                         </actions>
2473                 </permacrud>
2474         </class>
2475
2476         <class id="acsaf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_authority_field" oils_persist:tablename="authority.control_set_authority_field" reporter:label="Authority Control Set Authority Field" oils_persist:field_safe="true">
2477                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2478                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2479                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2480                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2481                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2482                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2483                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2484                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2485                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2486                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2487                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2488                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2489                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2490                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2491                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2492                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2493                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2494                 </fields>
2495                 <links>
2496                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2497                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2498                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2499                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2500                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2501                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2502                         <link field="heading" reltype="has_a" key="id" map="" class="ahf"/>
2503                 </links>
2504                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2505                         <actions>
2506                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2507                                 <retrieve/>
2508                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2509                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2510                         </actions>
2511                 </permacrud>
2512         </class>
2513
2514         <class id="acsbf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field" oils_persist:tablename="authority.control_set_bib_field" reporter:label="Authority Control Set Bib Field" oils_persist:field_safe="true">
2515                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2516                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2517                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2518                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2519                 </fields>
2520                 <links>
2521                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2522                 </links>
2523                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2524                         <actions>
2525                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2526                                 <retrieve/>
2527                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2528                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2529                         </actions>
2530                 </permacrud>
2531         </class>
2532
2533         <class id="acsbfmfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field_metabib_field_map" oils_persist:tablename="authority.control_set_bib_field_metabib_field_map" reporter:label="Authority Control Set Bib Field to Metabib Field Map" oils_persist:field_safe="true">
2534                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2535                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2536                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2537                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2538                 </fields>
2539                 <links>
2540                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2541                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2542                 </links>
2543                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2544                         <actions>
2545                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2546                                 <retrieve/>
2547                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2548                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2549                         </actions>
2550                 </permacrud>
2551         </class>
2552
2553         <class id="at" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::thesaurus" oils_persist:tablename="authority.thesaurus" reporter:label="Authority Thesaurus" oils_persist:field_safe="true">
2554                 <fields oils_persist:primary="code">
2555                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2556                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2557                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2558                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2559                         <field reporter:label="Short Code" name="short_code" reporter:datatype="text" />
2560                         <field reporter:label="URI" name="uri" reporter:datatype="text" />
2561                 </fields>
2562                 <links>
2563                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2564                 </links>
2565                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2566                         <actions>
2567                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2568                                 <retrieve/>
2569                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2570                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2571                         </actions>
2572                 </permacrud>
2573         </class>
2574
2575         <class id="aba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis" oils_persist:tablename="authority.browse_axis" reporter:label="Authority Browse Axis" oils_persist:field_safe="true">
2576                 <fields oils_persist:primary="code">
2577                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2578                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2579                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2580                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2581                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2582                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2583                 </fields>
2584                 <links>
2585                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2586                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2587                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2588                 </links>
2589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2590                         <actions>
2591                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2592                                 <retrieve/>
2593                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2594                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2595                         </actions>
2596                 </permacrud>
2597         </class>
2598
2599     <class id="abaafm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis_authority_field_map" oils_persist:tablename="authority.browse_axis_authority_field_map" reporter:label="Authority Browse Axis Field Map" oils_persist:field_safe="true">
2600         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2601             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2602             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2603             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2604         </fields>
2605         <links>
2606             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2607             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2608         </links>
2609         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2610             <actions>
2611                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2612                 <retrieve/>
2613                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2614                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2615             </actions>
2616         </permacrud>
2617     </class>
2618
2619         <class id="are" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
2620                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2621                         <field name="active" reporter:datatype="bool"/>
2622                         <field name="create_date" reporter:datatype="timestamp"/>
2623                         <field name="creator" />
2624                         <field name="deleted" reporter:datatype="bool"/>
2625                         <field name="edit_date" reporter:datatype="timestamp"/>
2626                         <field name="editor" />
2627                         <field name="id" reporter:datatype="id" />
2628                         <field name="last_xact_id" />
2629                         <field name="marc" />
2630                         <field name="source" />
2631                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2632                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2633                         <field name="heading" />
2634                         <field name="simple_heading" />
2635                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2636                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2637                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2638                 </fields>
2639                 <links>
2640                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2641                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2642                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2643                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2644                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2645                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2646                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2647                 </links>
2648                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2649                         <actions>
2650                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2651                                 <retrieve/>
2652                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2653                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2654                         </actions>
2655                 </permacrud>
2656         </class>
2657         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2658                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2659                         <field name="char_encoding" />
2660                         <field name="id" />
2661                         <field name="record" />
2662                         <field name="record_status" />
2663                         <field name="thesaurus" />
2664                 </fields>
2665                 <links>
2666                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2667                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2668                 </links>
2669         </class>
2670         <class id="abl" controller="open-ils.cstore" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
2671                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2672                         <field name="id" reporter:datatype="id" />
2673                         <field name="bib" reporter:datatype="link" />
2674                         <field name="authority" reporter:datatype="link" />
2675                 </fields>
2676                 <links>
2677                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2678                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2679                 </links>
2680         </class>
2681         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2682                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2683                         <field name="id" reporter:datatype="id" />
2684                         <field name="record" reporter:datatype="link" />
2685                         <field name="atag" reporter:datatype="link" />
2686                         <field name="value" reporter:datatype="text" />
2687                 </fields>
2688                 <links>
2689                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2690                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2691                 </links>
2692         </class>
2693
2694         <class id="ahf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::heading_field" oils_persist:tablename="authority.heading_field" reporter:label="Authority Heading Fields">
2695                 <fields oils_persist:primary="id" oils_persist:sequence="authority.heading_fields_id_seq">
2696                         <field name="id" reporter:datatype="id" />
2697                         <field name="heading_type" reporter:datatype="text" reporter:label="Heading Type" />
2698                         <field name="heading_purpose" reporter:datatype="text" reporter:label="Heading Purpose" />
2699                         <field name="label" reporter:datatype="text" reporter:label="Heading Field Label" />
2700                         <field name="format" reporter:datatype="text" reporter:label="Heading XSLT Format" />
2701                         <field name="heading_xpath" reporter:datatype="text" reporter:label="Heading XPath" />
2702                         <field name="component_xpath" reporter:datatype="text" reporter:label="Heading Component XPath" />
2703                         <field name="type_xpath" reporter:datatype="text" reporter:label="Related/Variant Type XPath" />
2704                         <field name="thesaurus_xpath" reporter:datatype="text" reporter:label="Thesaurus XPath" />
2705                         <field name="thesaurus_override_xpath" reporter:datatype="text" reporter:label="Thesaurus Override XPath" />
2706                         <field name="joiner" reporter:datatype="text" reporter:label="Joiner string" />
2707                 </fields>
2708                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2709                         <actions>
2710                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2711                                 <retrieve/>
2712                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2713                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2714                         </actions>
2715                 </permacrud>
2716         </class>
2717
2718         <class id="clm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::language_map" oils_persist:tablename="config.language_map" reporter:label="Language Map" oils_persist:field_safe="true">
2719                 <fields oils_persist:primary="code" oils_persist:sequence="">
2720                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2721                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2722                 </fields>
2723                 <links/>
2724         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2725             <actions>
2726                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2727                 <retrieve/>
2728                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2729                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2730             </actions>
2731         </permacrud>
2732         </class>
2733         <class id="mccp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2734                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2735                         <field name="accepting_usr" />
2736                         <field name="amount" reporter:datatype="money" />
2737                         <field name="amount_collected" reporter:datatype="money" />
2738                         <field name="approval_code" reporter:datatype="text"/>
2739                         <field name="cash_drawer" reporter:datatype="link"/>
2740                         <field name="cc_number" reporter:datatype="text"/>
2741                         <field name="cc_order_number" reporter:datatype="text"/>
2742                         <field name="cc_processor" reporter:datatype="text"/>
2743                         <field name="id" reporter:datatype="id" />
2744                         <field name="note" reporter:datatype="text"/>
2745                         <field name="payment_ts" reporter:datatype="timestamp"/>
2746                         <field name="xact" reporter:datatype="link"/>
2747                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2748                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2749                 </fields>
2750                 <links>
2751                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2752                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2753                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2754                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2755                 </links>
2756         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2757             <actions>
2758                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2759                     <context link="xact" jump="usr" field="home_ou"/>
2760                 </retrieve>
2761                         </actions>
2762                 </permacrud>
2763         </class>
2764         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition" oils_persist:field_safe="true">
2765                 <fields oils_persist:primary="name">
2766                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2767                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2768                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2769                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2770                 </fields>
2771                 <links/>
2772         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2773             <actions>
2774                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2775                 <retrieve/>
2776                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2777                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2778             </actions>
2779         </permacrud>
2780         </class>
2781         <class id="mmpbbt" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="money::materialized_payment_by_billing_type" oils_persist:tablename="money.materialized_payment_by_billing_type" reporter:label="Payments by Billing Type">
2782                 <fields oils_persist:primary="id">
2783                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
2784                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
2785                         <field reporter:label="Payment ID" name="payment" reporter:datatype="link"/>
2786                         <field reporter:label="Billing ID" name="billing" reporter:datatype="link"/>
2787                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
2788                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
2789                         <field reporter:label="Payment Amount" name="amount" reporter:datatype="money"/>
2790                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
2791                         <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
2792                         <field reporter:label="Payment Location" name="payment_ou" reporter:datatype="org_unit"/>
2793                         <field reporter:label="Billing Location" name="billing_ou" reporter:datatype="org_unit"/>
2794                 </fields>
2795                 <links>
2796                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2797                         <link field="payment" reltype="has_a" key="id" map="" class="mp"/>
2798                         <link field="billing" reltype="has_a" key="id" map="" class="mb"/>
2799                         <link field="payment_ou" reltype="has_a" key="id" map="" class="aou"/>
2800                         <link field="billing_ou" reltype="has_a" key="id" map="" class="aou"/>
2801                 </links>
2802         </class>
2803         <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">
2804
2805         <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">
2806                 <fields oils_persist:primary="alias">
2807                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2808                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2809                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2810                 </fields>
2811                 <links>
2812                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2813                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2814                 </links>
2815         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2816             <actions>
2817                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2818                 <retrieve/>
2819                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2820                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2821             </actions>
2822         </permacrud>
2823         </class>
2824
2825         <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">
2826                 <fields oils_persist:primary="name">
2827                         <field reporter:label="Name" name="name" reporter:datatype="text" reporter:selector="label"/>
2828                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2829                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2830                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2831                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2832                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2833                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2834                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2835                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2836                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2837                 </fields>
2838                 <links>
2839                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2840                 </links>
2841         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2842             <actions>
2843                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2844                 <retrieve/>
2845                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2846                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2847             </actions>
2848         </permacrud>
2849         </class>
2850
2851         <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">
2852                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2853                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2854                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2855                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2856                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2857                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2858                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2859                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
2860                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2861                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2862                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2863                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2864                         <field reporter:label="Display Field?" name="display_field" reporter:datatype="bool" />
2865                         <field reporter:label="Display XPath" name="display_xpath" reporter:datatype="text" />
2866                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2867                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2868                         <field reporter:label="Browse Sort XPath" name="browse_sort_xpath" reporter:datatype="text" />
2869                         <field reporter:label="Authority XPath" name="authority_xpath" reporter:datatype="text" />
2870                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2871                         <field reporter:label="Display Field Map" name="display_field_map" oils_persist:virtual="true" reporter:datatype="link"/>
2872                         <field reporter:label="Virtual Field Data Suppliers" name="data_sources" oils_persist:virtual="true" reporter:datatype="link"/>
2873                 </fields>
2874                 <links>
2875                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
2876                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2877                         <link field="display_field_map" reltype="might_have" key="field" map="" class="cdfm"/>
2878                         <link field="data_sources" reltype="has_many" key="virtual" map="" class="cmfvm"/>
2879                 </links>
2880         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2881             <actions>
2882                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2883                 <retrieve/>
2884                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2885                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2886             </actions>
2887         </permacrud>
2888         </class>
2889
2890         <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">
2891                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_virtual_map_id_seq">
2892                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2893                         <field reporter:label="Real" name="real" reporter:datatype="link"/>
2894                         <field reporter:label="Virtual" name="virtual" reporter:datatype="link"/>
2895                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
2896                 </fields>
2897                 <links>
2898                         <link field="real" reltype="has_a" key="id" map="" class="cmf"/>
2899                         <link field="virtual" reltype="has_a" key="id" map="" class="cmf"/>
2900                 </links>
2901         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2902             <actions>
2903                 <create permission="CREATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2904                 <retrieve/>
2905                 <update permission="UPDATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2906                 <delete permission="DELETE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2907             </actions>
2908         </permacrud>
2909         </class>
2910
2911         <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">
2912                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2913                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2914                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2915                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2916                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2917                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2918                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2919                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2920                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2921                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2922                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2923                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2924                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2925                 </fields>
2926                 <links>
2927                 </links>
2928                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2929                         <actions>
2930                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2931                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2932                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2933                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2934                         </actions>
2935                 </permacrud>
2936         </class>
2937         <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">
2938                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2939                         <field name="id" reporter:datatype="id" />
2940                         <field name="name" reporter:datatype="text"/>
2941                         <field name="xpath" reporter:datatype="text"/>
2942                         <field name="format" reporter:datatype="link"/>
2943                         <field name="first_word" reporter:datatype="bool" />
2944                 </fields>
2945                 <links/>
2946         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2947             <actions>
2948                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2949                 <retrieve/>
2950                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2951                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2952             </actions>
2953         </permacrud>
2954         </class>
2955         <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">
2956                 <fields oils_persist:primary="code" oils_persist:sequence="">
2957                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2958                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2959                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2960                 </fields>
2961                 <links/>
2962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2963             <actions>
2964                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2965                 <retrieve/>
2966                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2967                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2968             </actions>
2969         </permacrud>
2970         </class>
2971         <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">
2972                 <fields oils_persist:primary="code" oils_persist:sequence="">
2973                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2974                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2975                 </fields>
2976                 <links/>
2977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2978             <actions>
2979                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2980                 <retrieve/>
2981                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2982                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2983             </actions>
2984         </permacrud>
2985         </class>
2986     <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">
2987         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2988             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2989             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2990             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2991             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2992         </fields>
2993         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2994             <actions>
2995                 <retrieve/>
2996             </actions>
2997         </permacrud>
2998     </class>
2999         <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">
3000                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
3001                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3002                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3003                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3004                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3005                 </fields>
3006                 <links>
3007                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3008                 </links>
3009         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3010             <actions>
3011                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3012                 <retrieve/>
3013                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3014                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
3015             </actions>
3016         </permacrud>
3017         </class>
3018         <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">
3019                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
3020                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3021                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3022                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3023                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3024                 </fields>
3025                 <links>
3026                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3027                 </links>
3028         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3029             <actions>
3030                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
3031                 <retrieve/>
3032                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
3033                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
3034             </actions>
3035         </permacrud>
3036         </class>
3037         <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">
3038                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
3039                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3040                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
3041                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3042                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3043                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3044                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3045                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
3046                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
3047                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3048                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3049                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3050                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3051                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
3052                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
3053                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3054                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3055                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3056                 </fields>
3057                 <links>
3058                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3059                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3060                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3061                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3062                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3063                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3064                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3065                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3066                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3067                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3068                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3069                 </links>
3070         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3071             <actions>
3072                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3073                 <retrieve/>
3074                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3075                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3076             </actions>
3077         </permacrud>
3078         </class>
3079         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3080                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3081                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3082                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3083                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3084                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3085                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3086                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3087                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3088                 </fields>
3089                 <links>
3090                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3091                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3092         </links>
3093         </class>
3094         <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">
3095                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3096                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3097                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3098                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3099                 </fields>
3100                 <links>
3101                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3102                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3103                 </links>
3104         </class>
3105         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3106                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3107                         <field name="id" reporter:datatype="id" />
3108                         <field name="value" oils_persist:i18n="true" />
3109                 </fields>
3110                 <links/>
3111         </class>
3112         <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">
3113                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3114                         <field name="balance_owed" reporter:datatype="money" />
3115                         <field name="total_owed" reporter:datatype="money" />
3116                         <field name="total_paid" reporter:datatype="money" />
3117                         <field name="usr" reporter:datatype="link"/>
3118                 </fields>
3119                 <links>
3120                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3121         </links>
3122         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3123             <actions>
3124                 <retrieve permission="VIEW_USER">
3125                     <context link="usr" field="home_ou"/>
3126                 </retrieve>
3127             </actions>
3128         </permacrud>
3129         </class>
3130         <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">
3131                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3132                         <field name="collector" />
3133                         <field name="enter_time" reporter:datatype="timestamp"/>
3134                         <field name="id" reporter:datatype="id" />
3135                         <field name="location" reporter:datatype="link"/>
3136                         <field name="usr" reporter:datatype="link"/>
3137                 </fields>
3138                 <links>
3139                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3140                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3141                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3142                 </links>
3143         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3144             <actions>
3145                 <create permission="money.collections_tracker.create" context_field="location"/>
3146                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3147                 <delete permission="money.collections_tracker.create" context_field="location"/>
3148             </actions>
3149         </permacrud>
3150         </class>
3151         <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">
3152                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3153                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3154                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3155                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3156                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3157                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3158                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3159                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3160                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3161                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3162                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3163                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3164                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3165                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3166                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3167                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3168                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3169                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3170                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3171                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3172                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3173                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3174                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3175                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3176                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3177                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3178                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3179                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3180                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3181                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3182                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3183                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3184                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3185                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3186                         <field reporter:label="Display Fields" name="display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3187                         <field reporter:label="Flat Display Entries" name="flat_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3188                         <field reporter:label="Compressed Display Entries" name="compressed_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3189                         <field reporter:label="Wide Display Entries" name="wide_display_entry" oils_persist:virtual="true" reporter:datatype="link"/>
3190                         <field reporter:label="Merge Date" name="merge_date" reporter:datatype="timestamp"/>
3191                         <field reporter:label="Merged To" name="merged_to" reporter:datatype="link"/>
3192                 </fields>
3193                 <links>
3194                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3195                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3196                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3197                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3198                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3199                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3200                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3201                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3202                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3203                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3204                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3205                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3206                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3207                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3208                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3209                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3210                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3211                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3212                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3213                         <link field="mattrs" reltype="might_have" key="id" map="" class="mraf"/>
3214                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3215                         <link field="display_entries" reltype="has_many" key="source" map="" class="mde"/>
3216                         <link field="flat_display_entries" reltype="has_many" key="source" map="" class="mfde"/>
3217                         <link field="compressed_display_entries" reltype="has_many" key="source" map="" class="mcde"/>
3218                         <link field="wide_display_entry" reltype="might_have" key="source" map="" class="mwde"/>
3219                         <link field="merged_to" reltype="has_a" key="id" map="" class="bre"/>
3220                 </links>
3221         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3222             <actions>
3223                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3224                 <retrieve/>
3225                 <update permission="UPDATE_MARC" global_required="true"/>
3226                 <!-- 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. -->
3227                 <delete permission="DELETE_RECORD" global_required="true"/>
3228             </actions>
3229         </permacrud>
3230         </class>
3231         <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">
3232                 <fields oils_persist:primary="id">
3233                         <field name="dow_0_close" />
3234                         <field name="dow_0_open" />
3235                         <field name="dow_1_close" />
3236                         <field name="dow_1_open" />
3237                         <field name="dow_2_close" />
3238                         <field name="dow_2_open" />
3239                         <field name="dow_3_close" />
3240                         <field name="dow_3_open" />
3241                         <field name="dow_4_close" />
3242                         <field name="dow_4_open" />
3243                         <field name="dow_5_close" />
3244                         <field name="dow_5_open" />
3245                         <field name="dow_6_close" />
3246                         <field name="dow_6_open" />
3247                         <field name="id" reporter:datatype="id" />
3248                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3249                 </fields>
3250                 <links>
3251                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3252                 </links>
3253         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3254             <actions>
3255                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3256                 <retrieve/>
3257                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3258                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3259             </actions>
3260         </permacrud>
3261         </class>
3262         <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">
3263                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3264                         <field name="id" reporter:datatype="id" />
3265                         <field name="record" reporter:datatype="link"/>
3266                         <field name="label" reporter:datatype="text"/>
3267                         <field name="label_sortkey" reporter:datatype="text"/>
3268                         <field name="deleted" reporter:datatype="bool"/>
3269                 </fields>
3270                 <links>
3271                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3272                 </links>
3273         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3274             <actions>
3275                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3276                 <retrieve/>
3277                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3278                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3279             </actions>
3280         </permacrud>
3281         </class>
3282         <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">
3283                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3284                         <field name="id" reporter:datatype="id" />
3285                         <field name="target_copy" reporter:datatype="link" />
3286                         <field name="part" reporter:datatype="link"/>
3287                 </fields>
3288                 <links>
3289                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3290                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3291                 </links>
3292         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3293             <actions>
3294                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3295                 <retrieve/>
3296                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3297                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3298             </actions>
3299         </permacrud>
3300         </class>
3301         <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">
3302                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3303                         <field name="close_end" reporter:datatype="timestamp" />
3304                         <field name="close_start" reporter:datatype="timestamp" />
3305                         <field name="id" reporter:datatype="id" />
3306                         <field name="org_unit" reporter:datatype="org_unit"/>
3307                         <field name="reason" reporter:datatype="text"/>
3308                         <field name="full_day" reporter:datatype="bool"/>
3309                         <field name="multi_day" reporter:datatype="bool"/>
3310                 </fields>
3311                 <links>
3312                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3313                 </links>
3314         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3315             <actions>
3316                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3317                 <retrieve/>
3318                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3319                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3320             </actions>
3321         </permacrud>
3322         </class>
3323         <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">
3324                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3325                         <field name="extended" reporter:datatype="interval"/>
3326                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3327                         <field name="max_renewals" reporter:datatype="int" />
3328                         <field name="name" reporter:datatype="text"/>
3329                         <field name="normal" reporter:datatype="interval"/>
3330                         <field name="shrt" reporter:datatype="interval"/>
3331                 </fields>
3332                 <links>
3333                 </links>
3334         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3335             <actions>
3336                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3337                 <retrieve/>
3338                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3339                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3340             </actions>
3341         </permacrud>
3342         </class>
3343
3344         <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">
3345                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3346                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3347                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3348             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3349                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3350             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3351                 </fields>
3352                 <links>
3353             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3354                 </links>
3355                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3356             <actions>
3357                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3358                 <retrieve/>
3359                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3360                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3361             </actions>
3362                 </permacrud>
3363         </class>
3364
3365         <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">
3366                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3367                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3368                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3369                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3370             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3371                 </fields>
3372                 <links>
3373                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3374                 </links>
3375                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3376             <actions>
3377                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3378                 <retrieve/>
3379                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3380                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3381             </actions>
3382                 </permacrud>
3383         </class>
3384
3385         <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">
3386                 <fields oils_persist:primary="id" oils_persist:sequence="">
3387                         <field name="balance_owed" reporter:datatype="money"/>
3388                         <field name="id" reporter:datatype="id" />
3389                         <field name="last_billing_note" reporter:datatype="text"/>
3390                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3391                         <field name="last_billing_type" reporter:datatype="text"/>
3392                         <field name="last_payment_note" reporter:datatype="text"/>
3393                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3394                         <field name="last_payment_type" reporter:datatype="text"/>
3395                         <field name="total_owed" reporter:datatype="money"/>
3396                         <field name="total_paid" reporter:datatype="money"/>
3397                         <field name="usr" reporter:datatype="link"/>
3398                         <field name="xact_finish" reporter:datatype="timestamp" />
3399                         <field name="xact_start" reporter:datatype="timestamp" />
3400                         <field name="xact_type" reporter:datatype="text"/>
3401                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3402                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3403                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3404                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3405                         <field name="billing_location" reporter:datatype="link"/>
3406                 </fields>
3407                 <links>
3408                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3409                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3410                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3411                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3412                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3413                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3414                 </links>
3415                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3416                         <actions>
3417                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3418                                         <context link="usr" field="home_ou" />
3419                                 </retrieve>
3420                         </actions>
3421                 </permacrud>
3422         </class>
3423         <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">
3424                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3425                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3426                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3427                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3428                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3429                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3430                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3431                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3432                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3433                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3434                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3435                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3436                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3437                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3438                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3439                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3440                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3441                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3442                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3443                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3444                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3445                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3446                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3447                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3448                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3449                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3450                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3451                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3452                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3453                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3454                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3455                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3456                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3457                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3458                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3459                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3460                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3461                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3462                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3463                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3464                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3465                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3466                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3467                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3468                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3469                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3470                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3471                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3472                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3473                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3474                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3475                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3476                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3477                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3478                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3479                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3480                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3481                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3482                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3483                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3484                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3485                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3486                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3487                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3488                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3489                 </fields>
3490                 <links>
3491                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3492                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3493                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3494                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3495                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3496                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3497                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3498                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3499                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3500                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3501                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3502                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3503                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3504                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3505                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3506                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3507                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3508                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3509                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3510                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3511                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3512                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3513                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3514                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3515                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3516                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3517                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3518                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3519                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3520                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3521                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3522                 </links>
3523                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3524                         <actions>
3525                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3526                         </actions>
3527                 </permacrud>
3528         </class>
3529         <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">
3530                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3531                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3532                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3533                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3534                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3535                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3536                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3537                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3538                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3539         </fields>
3540                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3541                         <actions>
3542                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3543                                 <retrieve/>
3544                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3545                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3546                         </actions>
3547                 </permacrud>
3548         </class>
3549         <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">
3550                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3551                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3552                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3553                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3554                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3555         </fields>
3556         <links>
3557                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3558                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3559                 </links>
3560                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3561                         <actions>
3562                                 <retrieve permission="RUN_REPORTS">
3563                                         <context link="usr" field="home_ou" />
3564                                 </retrieve>
3565                         </actions>
3566                 </permacrud>
3567         </class>
3568         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3569                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3570                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3571                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3572                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3573                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3574                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3575                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3576         </fields>
3577         <links>
3578                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3579                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3580                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3581                 </links>
3582                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3583                         <actions>
3584                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3585                                         <context link="usr" field="home_ou" />
3586                                         <context link="ws" field="owning_lib" />
3587                                 </retrieve>
3588                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3589                                         <context link="usr" field="home_ou" />
3590                                         <context link="ws" field="owning_lib" />
3591                                 </create>
3592                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3593                                         <context link="usr" field="home_ou" />
3594                                         <context link="ws" field="owning_lib" />
3595                                 </update>
3596                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3597                                         <context link="usr" field="home_ou" />
3598                                         <context link="ws" field="owning_lib" />
3599                                 </delete>
3600                         </actions>
3601                 </permacrud>
3602         </class>
3603         <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">
3604                 <fields oils_persist:primary="name">
3605                         <field name="name" reporter:datatype="text"/>
3606                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3607                 </fields>
3608                 <links/>
3609                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3610                         <actions>
3611                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3612                                 <retrieve/>
3613                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3614                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3615                         </actions>
3616                 </permacrud>
3617         </class>
3618         <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">
3619                 <fields oils_persist:primary="name">
3620                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3621                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3622                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3623                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3624                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3625                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3626                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3627                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3628                 </fields>
3629                 <links>
3630                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3631                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3632                 </links>
3633                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3634                         <actions>
3635                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3636                                 <retrieve/>
3637                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3638                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3639                         </actions>
3640                 </permacrud>
3641         </class>
3642         <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">
3643                 <fields oils_persist:primary="name">
3644                         <field name="name" reporter:datatype="text"/>
3645                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3646                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3647                         <field name="datatype" reporter:datatype="text"/>
3648                         <field name="view_perm" reporter:datatype="link"/>
3649                         <field name="update_perm" reporter:datatype="link"/>
3650                         <field name="fm_class" reporter:datatype="text"/>
3651                         <field name="grp" reporter:datatype="link"/>
3652                 </fields>
3653                 <links>
3654                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3655                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3656                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3657                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3658                 </links>
3659                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3660                         <actions>
3661                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3662                                 <retrieve/>
3663                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3664                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3665                         </actions>
3666                 </permacrud>
3667         </class>
3668         <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">
3669                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3670                         <field name="id" />
3671                         <field name="name"  reporter:datatype="text"/>
3672                         <field name="org_unit" reporter:datatype="org_unit"/>
3673                         <field name="value"  reporter:datatype="text"/>
3674                 </fields>
3675                 <links>
3676                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3677                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3678                 </links>
3679         </class>
3680         <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">
3681                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3682                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3683                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3684                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3685                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3686                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3687                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3688                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3689                 </fields>
3690                 <links>
3691                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3692                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3693                 </links>
3694         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3695             <actions>
3696                 <create permission="CREATE_COPY_NOTE">
3697                     <context link="owning_copy" field="circ_lib"/>
3698                 </create>
3699                 <retrieve permission="VIEW_COPY_NOTES">
3700                     <context link="owning_copy" field="circ_lib"/>
3701                 </retrieve>
3702                 <update permission="UPDATE_COPY_NOTE">
3703                     <context link="owning_copy" field="circ_lib"/>
3704                 </update>
3705                 <delete permission="DELETE_COPY_NOTE">
3706                     <context link="owning_copy" field="circ_lib"/>
3707                 </delete>
3708             </actions>
3709         </permacrud>
3710         </class>
3711         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3712                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3713                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3714                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3715                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3716                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3717                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3718                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3719                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3720                 </fields>
3721                 <links>
3722                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3723                 </links>
3724         </class>
3725         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3726                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3727                         <field name="fingerprint"  reporter:datatype="text"/>
3728                         <field name="id" reporter:datatype="id" />
3729                         <field name="master_record" reporter:datatype="link"/>
3730                         <field name="mods"  reporter:datatype="text"/>
3731                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3732                 </fields>
3733                 <links>
3734                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3735                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3736                 </links>
3737         </class>
3738         <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">
3739                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3740                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3741                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3742                 </fields>
3743                 <links/>
3744         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3745             <actions>
3746                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3747                 <retrieve/>
3748                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3749                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3750             </actions>
3751         </permacrud>
3752         </class>
3753         <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">
3754                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3755                         <field name="code"  reporter:datatype="text"/>
3756                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3757                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3758                 </fields>
3759                 <links/>
3760         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3761             <actions>
3762                 <create permission="CREATE_PERM" global_required="true"/>
3763                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3764                 <update permission="UPDATE_PERM" global_required="true"/>
3765                 <delete permission="DELETE_PERM" global_required="true"/>
3766             </actions>
3767         </permacrud>
3768         </class>
3769         <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">
3770                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3771                         <field name="id" reporter:datatype="id" />
3772                         <field name="metarecord" reporter:datatype="link"/>
3773                         <field name="source" reporter:datatype="link"/>
3774                 </fields>
3775                 <links>
3776                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3777                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3778                 </links>
3779         </class>
3780         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
3781                         oils_obj:fieldmapper="metabib::display_entry" 
3782                         oils_persist:tablename="metabib.display_entry" 
3783                         oils_persist:field_safe="true"
3784                         reporter:label="Display Field Entry" oils_persist:readonly="true">
3785                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
3786                         <field name="id" reporter:datatype="id" />
3787                         <field name="field" reporter:datatype="link"/>
3788                         <field name="source" reporter:datatype="link"/>
3789                         <field name="value"  reporter:datatype="text"/>
3790                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
3791                 </fields>
3792                 <links>
3793                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3794                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3795                 </links>
3796                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3797                         <actions>
3798                                 <retrieve/>
3799                         </actions>
3800                 </permacrud>
3801         </class>
3802         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
3803                 oils_persist:tablename="metabib.flat_display_entry"
3804                 oils_obj:fieldmapper="metabib::flat_display_entry" 
3805                 oils_persist:field_safe="true"
3806                 reporter:label="Flat Display Entry" 
3807                 oils_persist:readonly="true">
3808                 <fields>
3809                         <field name="source" reporter:datatype="id" />
3810                         <field name="name" reporter:datatype="text"/>
3811                         <field name="multi" reporter:datatype="bool"/>
3812                         <field name="label" reporter:datatype="text"/>
3813                         <field name="field" reporter:datatype="link"/>
3814                         <field name="value" reporter:datatype="text"/>
3815                 </fields>
3816                 <links>
3817                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3818                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3819                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
3820                 </links>
3821                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3822                         <actions>
3823                                 <retrieve/>
3824                         </actions>
3825                 </permacrud>
3826         </class>
3827         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
3828                 oils_persist:tablename="metabib.compressed_display_entry"
3829                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
3830                 oils_persist:field_safe="true"
3831                 reporter:label="Compressed Display Entry" 
3832                 oils_persist:readonly="true">
3833                 <fields>
3834                         <field name="source" reporter:datatype="id" />
3835                         <field name="name" reporter:datatype="text"/>
3836                         <field name="multi" reporter:datatype="bool"/>
3837                         <field name="label" reporter:datatype="text"/>
3838                         <field name="field" reporter:datatype="link"/>
3839                         <field name="value" reporter:datatype="text"/>
3840                 </fields>
3841                 <links>
3842                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3843                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3844                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
3845                 </links>
3846                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3847                         <actions>
3848                                 <retrieve/>
3849                         </actions>
3850                 </permacrud>
3851         </class>
3852         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
3853                 oils_persist:tablename="metabib.wide_display_entry"
3854                 oils_obj:fieldmapper="metabib::wide_display_entry" 
3855                 oils_persist:field_safe="true"
3856                 reporter:label="Wide Display Entry" 
3857                 oils_persist:readonly="true">
3858                 <fields oils_persist:primary="source">
3859                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
3860                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
3861                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
3862                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
3863                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
3864                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
3865                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
3866                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
3867                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
3868                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
3869                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
3870                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
3871                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
3872                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
3873                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
3874                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
3875                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
3876                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
3877                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
3878                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
3879                 </fields>
3880                 <links>
3881                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3882                 </links>
3883                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3884                         <actions>
3885                                 <retrieve/>
3886                         </actions>
3887                 </permacrud>
3888         </class>
3889
3890         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
3891                 oils_persist:tablename="config.display_field_map"
3892                 oils_obj:fieldmapper="config::display_field_map"
3893                 oils_persist:field_safe="true"
3894                 reporter:label="Display Field Map">
3895                 <fields oils_persist:primary="name">
3896                         <field name="name" reporter:datatype="text"/>
3897                         <field name="field" reporter:datatype="link"/>
3898                         <field name="multi" reporter:datatype="bool"/>
3899                 </fields>
3900                 <links>
3901                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3902                 </links>
3903                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3904                         <actions>
3905                                 <retrieve/>
3906                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
3907                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
3908                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
3909                         </actions>
3910                 </permacrud>
3911         </class>
3912
3913         <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">
3914                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3915                         <field name="id" reporter:datatype="id" />
3916                         <field name="field" reporter:datatype="link"/>
3917                         <field name="source" reporter:datatype="link"/>
3918                         <field name="value"  reporter:datatype="text"/>
3919                 </fields>
3920                 <links>
3921                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3922                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3923                 </links>
3924         </class>
3925         <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">
3926                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3927                         <field name="id" reporter:datatype="id" />
3928                         <field name="value" reporter:datatype="text"/>
3929                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3930                 </fields>
3931                 <links>
3932                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3933                 </links>
3934         </class>
3935         <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">
3936                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3937                         <field name="id" reporter:datatype="id" />
3938                         <field name="entry" reporter:datatype="link"/>
3939                         <field name="def" reporter:datatype="link"/>
3940                         <field name="source" reporter:datatype="link"/>
3941                 </fields>
3942                 <links>
3943                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3944                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3945                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3946                 </links>
3947         </class>
3948         <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">
3949                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3950                         <field name="id" reporter:datatype="id" />
3951                         <field name="entry" reporter:datatype="link"/>
3952                         <field name="simple_heading" reporter:datatype="link"/>
3953                 </fields>
3954                 <links>
3955                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3956                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3957                 </links>
3958         </class>
3959         <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">
3960                 <oils_persist:source_definition><![CDATA[
3961                         SELECT * FROM metabib.author_field_entry
3962                                                 UNION ALL
3963                         SELECT * FROM metabib.keyword_field_entry
3964                                                 UNION ALL
3965                         SELECT * FROM metabib.identifier_field_entry
3966                                                 UNION ALL
3967                         SELECT * FROM metabib.title_field_entry
3968                                                 UNION ALL
3969                         SELECT * FROM metabib.subject_field_entry
3970                                                 UNION ALL
3971                         SELECT * FROM metabib.series_field_entry
3972                 ]]></oils_persist:source_definition>
3973                 <fields>
3974                         <field name="field" reporter:datatype="link"/>
3975                         <field name="id" reporter:datatype="id" />
3976                         <field name="source" reporter:datatype="link"/>
3977                         <field name="value"  reporter:datatype="text"/>
3978                 </fields>
3979                 <links>
3980                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3981                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3982                 </links>
3983         </class>
3984         <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">
3985                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3986                         <field name="field" reporter:datatype="link"/>
3987                         <field name="id" reporter:datatype="id" />
3988                         <field name="source" reporter:datatype="link"/>
3989                         <field name="value"  reporter:datatype="text"/>
3990                 </fields>
3991                 <links>
3992                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3993                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3994                 </links>
3995         </class>
3996         <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">
3997                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3998                         <field name="accepting_usr" reporter:datatype="link"/>
3999                         <field name="amount" reporter:datatype="money" />
4000                         <field name="amount_collected" reporter:datatype="money" />
4001                         <field name="cash_drawer" reporter:datatype="link"/>
4002                         <field name="id" reporter:datatype="id" />
4003                         <field name="note"  reporter:datatype="text"/>
4004                         <field name="payment_ts" reporter:datatype="timestamp"/>
4005                         <field name="xact" reporter:datatype="link"/>
4006                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4007                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4008                 </fields>
4009                 <links>
4010                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4011                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4012                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4013                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4014                 </links>
4015         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4016             <actions>
4017                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4018                     <context link="xact" jump="usr" field="home_ou"/>
4019                 </retrieve>
4020                         </actions>
4021                 </permacrud>
4022         </class>
4023         <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">
4024                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4025                         <field name="accepting_usr" reporter:datatype="link"/>
4026                         <field name="amount" reporter:datatype="money" />
4027                         <field name="amount_collected" reporter:datatype="money" />
4028                         <field name="id" reporter:datatype="id" />
4029                         <field name="note"  reporter:datatype="text"/>
4030                         <field name="payment_ts" reporter:datatype="timestamp"/>
4031                         <field name="xact" reporter:datatype="link"/>
4032                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4033                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4034                 </fields>
4035                 <links>
4036                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4037                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4038                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4039                 </links>
4040         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4041             <actions>
4042                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4043                     <context link="xact" jump="usr" field="home_ou"/>
4044                 </retrieve>
4045                         </actions>
4046                 </permacrud>
4047         </class>
4048         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4049                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4050                         <field name="accepting_usr" reporter:datatype="link"/>
4051                         <field name="amount" reporter:datatype="money" />
4052                         <field name="amount_collected" reporter:datatype="money" />
4053                         <field name="id" reporter:datatype="id" />
4054                         <field name="note"  reporter:datatype="text"/>
4055                         <field name="payment_ts" reporter:datatype="timestamp"/>
4056                         <field name="xact" reporter:datatype="link"/>
4057                         <field name="billing" reporter:datatype="link"/>
4058                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4059                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4060                 </fields>
4061                 <links>
4062                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4063                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4064                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4065                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4066                 </links>
4067         </class>
4068         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4069                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4070                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4071                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4072                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4073                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4074                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4075                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4076                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4077                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4078                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4079                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4080                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4081                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4082                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4083                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4084                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4085                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4086                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4087                 </fields>
4088                 <links>
4089                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4090                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4091                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4092                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4093                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4094                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4095                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4096                 </links>
4097         </class>
4098
4099         <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">
4100                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4101                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4102                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4103                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4104                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4105                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4106                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4107                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4108                 </fields>
4109                 <links/>
4110         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4111             <actions>
4112                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4113                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
4114                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4115                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4116             </actions>
4117         </permacrud>
4118         </class>
4119         <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">
4120                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4121                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4122                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4123                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4124                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4125                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4126                 </fields>
4127                 <links>
4128                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4129                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4130                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4131         </links>
4132         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4133             <actions>
4134                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4135                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4136                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4137                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4138             </actions>
4139         </permacrud>
4140         </class>
4141         <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">
4142                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4143                         <field name="holdable" reporter:datatype="bool"/>
4144                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4145                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4146                         <field name="opac_visible" reporter:datatype="bool"/>
4147             <field name="copy_active" reporter:datatype="bool"/>
4148             <field name="restrict_copy_delete" reporter:datatype="bool"/>
4149             <field name="is_available" reporter:datatype="bool"/>
4150                 </fields>
4151                 <links/>
4152         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4153             <actions>
4154                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4155                 <retrieve/>
4156                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4157                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4158             </actions>
4159         </permacrud>
4160         </class>
4161         <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">
4162                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
4163                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4164                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4165                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4166                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4167                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4168                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4169                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4170                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
4171                 </fields>
4172                 <links>
4173                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4174                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4175                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4176                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4177                 </links>
4178                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4179                         <actions>
4180                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4181                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4182                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4183                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4184                         </actions>
4185                 </permacrud>
4186         </class>
4187         <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">
4188                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4189                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4190                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4191                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4192                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4193                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4194                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4195                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4196                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4197                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4198                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4199                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4200                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4201                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4202                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4203                 </fields>
4204                 <links>
4205                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4206                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4207                 </links>
4208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4209                         <actions>
4210                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4211                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4212                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4213                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4214                         </actions>
4215                 </permacrud>
4216         </class>
4217         <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">
4218                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4219                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4220                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4221                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4222                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4223                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4224                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4225                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4226                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4227                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4228                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4229                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4230                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4231                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4232                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4233                 </fields>
4234                 <links>
4235                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4236                 </links>
4237                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4238                         <actions>
4239                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4240                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4241                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4242                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4243                         </actions>
4244                 </permacrud>
4245         </class>
4246
4247
4248         <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">
4249                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4250                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4251                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4252                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4253                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4254                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4255                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4256                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4257                 </fields>
4258                 <links>
4259                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4260                 </links>
4261         </class>
4262
4263         <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">
4264                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4265                         <field name="call_number" />
4266                         <field name="create_date" reporter:datatype="timestamp"/>
4267                         <field name="creator" reporter:datatype="link"/>
4268                         <field name="id" reporter:datatype="id" />
4269                         <field name="pub" reporter:datatype="bool"/>
4270                         <field name="title"  reporter:datatype="text"/>
4271                         <field name="value"  reporter:datatype="text"/>
4272                 </fields>
4273                 <links>
4274                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4275                 </links>
4276         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4277             <actions>
4278                 <create permission="CREATE_VOLUME_NOTE">
4279                     <context link="call_number" field="owning_lib"/>
4280                 </create>
4281                 <retrieve permission="VIEW_VOLUME_NOTES">
4282                     <context link="call_number" field="owning_lib"/>
4283                 </retrieve>
4284                 <update permission="UPDATE_VOLUME_NOTE">
4285                     <context link="call_number" field="owning_lib"/>
4286                 </update>
4287                 <delete permission="DELETE_VOLUME_NOTE">
4288                     <context link="call_number" field="owning_lib"/>
4289                 </delete>
4290             </actions>
4291         </permacrud>
4292         </class>
4293         <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">
4294                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4295                         <field name="create_date" reporter:datatype="timestamp"/>
4296                         <field name="creator" reporter:datatype="link"/>
4297                         <field name="edit_date" reporter:datatype="timestamp"/>
4298                         <field name="editor" reporter:datatype="link"/>
4299                         <field name="id" reporter:datatype="id" />
4300                         <field name="record" reporter:datatype="link"/>
4301                         <field name="value" reporter:datatype="text"/>
4302                 </fields>
4303                 <links>
4304                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4305                 </links>
4306         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4307             <actions>
4308                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4309                 <retrieve/>
4310                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4311                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4312             </actions>
4313         </permacrud>
4314         </class>
4315         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4316         <oils_persist:source_definition><![CDATA[
4317 SELECT  usr,
4318         SUM(
4319             CASE
4320                 WHEN (
4321                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4322                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4323                 ) THEN 1
4324                 ELSE 0
4325             END
4326         ) AS out,
4327
4328         SUM(
4329             CASE
4330                 WHEN (
4331                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4332                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4333                 ) THEN 1
4334                 ELSE 0
4335             END
4336         ) AS overdue,
4337
4338         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4339         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4340         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4341   FROM  action.circulation
4342   WHERE checkin_time IS NULL
4343   GROUP BY 1
4344         ]]></oils_persist:source_definition>
4345         <fields oils_persist:primary="usr">
4346             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4347             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4348             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4349             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4350             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4351             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4352         </fields>
4353         <links>
4354             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4355         </links>
4356         </class>
4357         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4358         <oils_persist:source_definition><![CDATA[
4359 SELECT  usr,
4360         STRING_AGG(
4361             CASE
4362                 WHEN (
4363                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4364                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4365                 ) THEN id::TEXT
4366                 ELSE '0'
4367             END
4368         ,',') AS out,
4369
4370         STRING_AGG(
4371             CASE
4372                 WHEN (
4373                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4374                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4375                 ) THEN id::TEXT
4376                 ELSE '0'
4377             END
4378         ,',') AS overdue,
4379
4380         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4381         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4382         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4383   FROM  action.circulation
4384   WHERE checkin_time IS NULL
4385   GROUP BY 1
4386         ]]></oils_persist:source_definition>
4387         <fields oils_persist:primary="usr">
4388             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4389             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4390             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4391             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4392             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4393             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4394         </fields>
4395         <links>
4396             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4397         </links>
4398         </class>
4399         <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">
4400                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4401                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4402                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4403                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4404                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4405                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4406                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4407                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4408                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4409                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4410                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4411                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4412                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4413                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4414                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4415                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4416                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4417                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4418                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4419                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4420                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4421                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4422                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4423                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4424                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4425                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4426                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4427                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4428                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4429                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4430                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4431                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4432                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4433                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4434                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4435                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4436                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4437                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4438                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4439                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4440                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4441                 </fields>
4442                 <links>
4443                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4444                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4445                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4446                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4447                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4448                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4449                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4450                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4451                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4452                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4453                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4454                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4455                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4456                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4457                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4458                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4459                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4460                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4461                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4462                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4463                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4464                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4465                 </links>
4466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4467                         <actions>
4468                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4469                         </actions>
4470                 </permacrud>
4471         </class>
4472         <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">
4473                 <fields>
4474                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4475                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4476                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4477                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4478                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4479                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4480                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4481                 </fields>
4482                 <links>
4483                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4484                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4485                 </links>
4486                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4487                         <actions>
4488                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4489                         </actions>
4490                 </permacrud>
4491         </class>
4492         <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">
4493                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4494                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4495                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4496                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4497                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4498                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4499                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4500                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4501                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4502                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4503                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4504                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4505                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4506                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4507                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4508                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4509                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4510                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4511                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4512                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4513                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4514                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4515                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4516                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4517                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4518                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4519                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4520                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4521                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4522                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4523                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4524                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4525                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4526                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4527                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4528                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4529                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4530                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4531                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4532                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4533                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4534                 </fields>
4535                 <links>
4536                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4537                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4538                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4539                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4540                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4541                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4542                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4543                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4544                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4545                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4546                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4547                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4548                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4549                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4550                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4551                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4552                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4553                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4554                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4555                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4556                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4557                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4558                 </links>
4559                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4560                         <actions>
4561                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4562                         </actions>
4563                 </permacrud>
4564         </class>
4565
4566         <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">
4567                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4568                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4569                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4570                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4571                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4572                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4573                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4574                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4575                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4576                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4577                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4578                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4579                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4580                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4581                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4582                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4583                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4584                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4585                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4586                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4587                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4588                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4589                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4590                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4591                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4592                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4593                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4594                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4595                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4596                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4597                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4598                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4599                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4600                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4601                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4602                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4603                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4604                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4605                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4606                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4607                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4608                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4609                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4610                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4611                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4612                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4613                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4614                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4615                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4616                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4617                 </fields>
4618                 <links>
4619                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4620                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4621                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4622                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4623                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4624                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4625                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4626                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4627                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4628                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4629                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4630                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4631                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4632                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4633                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4634                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4635                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4636                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4637                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4638                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4639                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4640                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4641                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4642                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4643                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4644                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4645                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4646                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4647                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4648                 </links>
4649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4650                         <actions>
4651                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4652                         </actions>
4653                 </permacrud>
4654         </class>
4655         <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">
4656                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4657                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4658                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4659                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4660                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4661                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4662                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4663                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4664                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4665                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4666                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4667                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4668                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4669                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4670                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4671                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4672                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4673                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4674                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4675                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4676                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4677                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4678                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4679                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4680                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4681                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4682                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4683                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4684                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4685                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4686                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4687                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4688                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4689                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4690                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4691                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4692                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4693                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4694                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4695                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4696                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4697                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4698                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4699                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4700                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4701                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4702                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4703                 </fields>
4704                 <links>
4705                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4706                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4707                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4708                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4709                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4710                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4711                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4712                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4713                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4714                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4715                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4716                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4717                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4718                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4719                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4720                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4721                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4722                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4723                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4724                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4725                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4726                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4727                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4728                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4729                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4730                 </links>
4731         </class>
4732         <class id="auch" 
4733                 controller="open-ils.cstore" 
4734                 oils_obj:fieldmapper="action::user_circ_history" 
4735                 oils_persist:tablename="action.usr_circ_history" 
4736                 reporter:label="User Checkout History">
4737                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4738                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4739                         <!-- prevent reporting on the user that owns the checkout history -->
4740                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4741                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4742                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4743                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4744                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4745                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4746                 </fields>
4747                 <links>
4748                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4749                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4750                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4751                 </links>
4752         </class>
4753         <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">
4754                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4755                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4756                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4757                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4758                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4759                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4760                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4761                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4762                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4763                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4764                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4765                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4766                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4767                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4768                 </fields>
4769                 <links>
4770                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4771                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4772                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4773                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4774                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4775                 </links>
4776                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4777                         <actions>
4778                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4779                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4780                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4781                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4782                         </actions>
4783                 </permacrud>
4784         </class>
4785
4786         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4787                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4788                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4789                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4790                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4791                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4792                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4793                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4794                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4795                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4796                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4797                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4798                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4799                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4800                 </fields>
4801                 <links>
4802                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4803                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4804                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4805                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4806                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4807                 </links>
4808                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4809                         <actions>
4810                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4811                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4812                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4813                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4814                         </actions>
4815                 </permacrud>
4816         </class>
4817         
4818         <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">
4819                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4820                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4821                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4822                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4823                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4824                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4825                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4826                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4827                 </fields>
4828                 <links>
4829                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4830                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4831                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4832                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4833                 </links>
4834                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4835                         <actions>
4836                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4837                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4838                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4839                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4840                         </actions>
4841                 </permacrud>
4842         </class>
4843         
4844         <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">
4845                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4846                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4847                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4848                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4849                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4850                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4851                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4852                 </fields>
4853                 <links>
4854                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4855                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4856                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4857                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4858                 </links>
4859                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4860                         <actions>
4861                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4862                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4863                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4864                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4865                         </actions>
4866                 </permacrud>
4867         </class>
4868         
4869         <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">
4870                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4871                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4872                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4873                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4874                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4875                 </fields>
4876                 <links>
4877                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4878                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4879                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4880                 </links>
4881                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4882                         <actions>
4883                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4884                     <context link="resource" field="owner" />
4885                 </create>
4886                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4887                     <context link="resource" field="owner" />
4888                 </retrieve>
4889                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4890                     <context link="resource" field="owner" />
4891                 </update>
4892                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4893                     <context link="resource" field="owner" />
4894                 </delete>
4895                         </actions>
4896                 </permacrud>
4897         </class>
4898         
4899         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4900                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4901                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4902                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4903                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4904                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4905                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4906                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4907                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4908                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4909                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4910                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4911                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4912                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4913                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4914                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4915                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4916                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4917                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4918                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4919                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4920                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4921                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4922                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4923                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4924                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4925                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4926                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4927                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4928                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4929                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4930                 </fields>
4931                 <links>
4932                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4933                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4934                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4935                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4936                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4937                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4938                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4939                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4940                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4941                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4942                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4943                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4944                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4945                 </links>
4946                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4947                         <actions>
4948                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4949                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4950                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4951                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4952                         </actions>
4953                 </permacrud>
4954         </class>
4955         
4956         <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">
4957                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4958                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4959                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4960                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4961                 </fields>
4962                 <links>
4963                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4964                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4965                 </links>
4966                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4967                         <actions>
4968                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4969                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4970                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4971                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4972                         </actions>
4973                 </permacrud>
4974         </class>
4975
4976         <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">
4977                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4978                         <field name="bucket" reporter:datatype="link"/>
4979                         <field name="id" reporter:datatype="id" />
4980                         <field name="target_call_number" reporter:datatype="link" />
4981                         <field name="create_time" reporter:datatype="timestamp" />
4982                         <field name="pos" reporter:datatype="int" />
4983                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4984                 </fields>
4985                 <links>
4986                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4987                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4988             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4989                 </links>
4990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4991                         <actions>
4992                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
4993                     <context link="bucket" owning_lib="owning_lib"/>
4994                 </retrieve>
4995             </actions>
4996         </permacrud>
4997         </class>
4998         <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">
4999                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
5000                         <field name="id" reporter:datatype="id" />
5001                         <field name="item" reporter:datatype="link"/>
5002                         <field name="note" reporter:datatype="text" />
5003                 </fields>
5004                 <links>
5005                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
5006                 </links>
5007         </class>
5008         <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">
5009                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
5010                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5011                         <field name="btype" reporter:datatype="text"/>
5012                         <field name="id" reporter:datatype="id" />
5013                         <field name="name" reporter:datatype="text"/>
5014                         <field name="description" reporter:datatype="text"/>
5015                         <field name="owner" reporter:datatype="link"/>
5016                         <field name="pub" reporter:datatype="bool"/>
5017                         <field name="create_time" reporter:datatype="timestamp" />
5018                         <field name="owning_lib" reporter:datatype="org_unit" />
5019                 </fields>
5020                 <links>
5021                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5022                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5023                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5024                 </links>
5025                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5026                         <actions>
5027                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5028                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5029                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5030                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5031                         </actions>
5032                 </permacrud>
5033         </class>
5034         <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">
5035                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5036                         <field name="id" reporter:datatype="id" />
5037                         <field name="bucket" reporter:datatype="link"/>
5038                         <field name="note" reporter:datatype="text" />
5039                 </fields>
5040                 <links>
5041                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5042                 </links>
5043         </class>
5044         <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">
5045                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5046                         <field name="hold" reporter:datatype="link"/>
5047                         <field name="id" reporter:datatype="id" />
5048                         <field name="target_copy" reporter:datatype="link"/>
5049                         <field name="proximity" reporter:datatype="number"/>
5050                 </fields>
5051                 <links>
5052                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5053                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5054                 </links>
5055         </class>
5056         <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">
5057                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5058                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5059                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5060                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5061                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5062                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5063                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5064                 </fields>
5065                 <links>
5066                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5067                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5068                 </links>
5069         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5070             <actions>
5071                 <create permission="CREATE_HOLD_NOTIFICATION">
5072                                         <context link="hold" jump="usr" field="home_ou" />
5073                                 </create>
5074                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5075                                         <context link="hold" jump="usr" field="home_ou" />
5076                                 </retrieve>
5077                 <update permission="CREATE_HOLD_NOTIFICATION">
5078                                         <context link="hold" jump="usr" field="home_ou" />
5079                                 </update>
5080                 <delete permission="CREATE_HOLD_NOTIFICATION">
5081                                         <context link="hold" jump="usr" field="home_ou" />
5082                                 </delete>
5083             </actions>
5084         </permacrud>
5085         </class>
5086         <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">
5087                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5088                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5089                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5090                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5091                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5092                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5093                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5094                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5095                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5096                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5097                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5098                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5099                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5100                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5101                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5102                 </fields>
5103                 <links>
5104                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5105                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5106                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5107                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5108                 </links>
5109         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5110             <actions>
5111                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5112                 <retrieve/>
5113                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5114                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5115             </actions>
5116         </permacrud>
5117         </class>
5118         <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">
5119                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5120                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5121                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5122                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5123                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
5124             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5125             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5126             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5127                 </fields>
5128                 <links>
5129                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5130                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5131                 </links>
5132         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5133             <actions>
5134                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5135                 <retrieve/>
5136                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5137                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5138             </actions>
5139         </permacrud>
5140         </class>
5141         <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">
5142                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5143                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5144             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5145             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5146                 </fields>
5147                 <links>
5148                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5149                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5150                 </links>
5151         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5152             <actions>
5153                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5154                                         <context link="lgroup" field="owner" />
5155                 </create>
5156                 <retrieve/>
5157                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5158                                         <context link="lgroup" field="owner" />
5159                 </update>
5160                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5161                                         <context link="lgroup" field="owner" />
5162                 </delete>
5163             </actions>
5164         </permacrud>
5165         </class>
5166
5167     <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">
5168         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5169             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5170             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5171             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5172             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5173         </fields>
5174         <links>
5175             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5176             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5177         </links>
5178         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5179             <actions>
5180                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5181                 <retrieve/>
5182                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5183                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5184             </actions>
5185         </permacrud>
5186     </class>
5187
5188         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5189                 <fields>
5190                         <field name="sre_id" oils_persist:virtual="true" />
5191                         <field name="location" oils_persist:virtual="true" />
5192                         <field name="owning_lib" oils_persist:virtual="true" />
5193                         <field name="basic_holdings" oils_persist:virtual="true" />
5194                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5195                         <field name="supplement_holdings" oils_persist:virtual="true" />
5196                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5197                         <field name="index_holdings" oils_persist:virtual="true" />
5198                         <field name="index_holdings_add" oils_persist:virtual="true" />
5199                         <field name="online" oils_persist:virtual="true" />
5200                         <field name="missing" oils_persist:virtual="true" />
5201                         <field name="incomplete" oils_persist:virtual="true" />
5202                 </fields>
5203         </class>
5204
5205         <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">
5206                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5207                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5208                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5209                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5210                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5211                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5212                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5213                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5214                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5215                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5216                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5217                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5218                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5219                 </fields>
5220                 <links>
5221                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5222                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5223                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5224                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5225                 </links>
5226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5227                         <actions>
5228                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5229                                 <retrieve/>
5230                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5231                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5232                         </actions>
5233                 </permacrud>
5234         </class>
5235
5236         <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">
5237                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5238                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5239                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5240                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5241                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5242                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5243                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5244                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5245                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5246                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5247                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5248                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5249                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5250                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5251                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5252                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5253                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5254                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5255                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5256                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5257                 </fields>
5258                 <links>
5259                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5260                 </links>
5261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5262                         <actions>
5263                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5264                                         <context link="subscription" field="owning_lib" />
5265                                 </create>
5266                                 <retrieve />
5267                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5268                                         <context link="subscription" field="owning_lib" />
5269                                 </update>
5270                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5271                                         <context link="subscription" field="owning_lib" />
5272                                 </delete>
5273                         </actions>
5274                 </permacrud>
5275         </class>
5276
5277         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5278                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5279                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5280                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5281                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5282                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5283                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5284                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5285                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5286                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5287                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5288                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5289                 </fields>
5290                 <links>
5291                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5292                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5293                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5294                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5295                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5296                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5297                 </links>
5298                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5299                         <actions>
5300                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5301                                 <retrieve />
5302                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5303                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5304                         </actions>
5305                 </permacrud>
5306         </class>
5307
5308         <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">
5309                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5310                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5311                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5312                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5313                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5314                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5315                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5316                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5317                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5318                 </fields>
5319                 <links>
5320                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5321                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5322                 </links>
5323                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5324                         <actions>
5325                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5326                     <context link="subscription" field="owning_lib"/>
5327                 </create>
5328                                 <retrieve />
5329                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5330                     <context link="subscription" field="owning_lib"/>
5331                 </update>
5332                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5333                     <context link="subscription" field="owning_lib"/>
5334                 </delete>
5335                         </actions>
5336                 </permacrud>
5337         </class>
5338
5339         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5340                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5341                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5342                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5343                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5344                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5345                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5346                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5347                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5348                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5349                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5350                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5351                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5352                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5353                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5354                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5355                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5356                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5357                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5358                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5359                 </fields>
5360                 <links>
5361                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5362                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5363                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5364                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5365                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5366                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5367                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5368                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5369                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5370                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5371                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5372                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5373                 </links>
5374                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5375                         <actions>
5376                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5377                                 <retrieve />
5378                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5379                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5380                         </actions>
5381                 </permacrud>
5382         </class>
5383
5384         <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">
5385                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5386                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5387                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5388                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5389                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5390                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5391                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5392                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5393                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5394                 </fields>
5395                 <links>
5396                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5397                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5398                 </links>
5399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5400                         <actions>
5401                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5402                                         <context link="distribution" field="holding_lib" />
5403                                 </create>
5404                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5405                                         <context link="distribution" field="holding_lib" />
5406                                 </retrieve>
5407                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5408                                         <context link="distribution" field="holding_lib" />
5409                                 </update>
5410                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5411                                         <context link="distribution" field="holding_lib" />
5412                                 </delete>
5413                         </actions>
5414                 </permacrud>
5415         </class>
5416
5417         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5418                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5419                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5420                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5421                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5422                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5423                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5424                 </fields>
5425                 <links>
5426                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5427                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5428                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5429                 </links>
5430                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5431                         <actions>
5432                                 <create permission="ADMIN_SERIAL_STREAM">
5433                                         <context link="distribution" field="holding_lib" />
5434                                 </create>
5435                                 <retrieve />
5436                                 <update permission="ADMIN_SERIAL_STREAM">
5437                                         <context link="distribution" field="holding_lib" />
5438                                 </update>
5439                                 <delete permission="ADMIN_SERIAL_STREAM">
5440                                         <context link="distribution" field="holding_lib" />
5441                                 </delete>
5442                         </actions>
5443                 </permacrud>
5444         </class>
5445
5446         <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">
5447                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5448                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5449                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5450                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5451                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5452                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5453                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5454                 </fields>
5455                 <links>
5456                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5457                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5458                 </links>
5459                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5460                         <actions>
5461                                 <create permission="ADMIN_SERIAL_STREAM">
5462                                         <context link="stream" jump="distribution" field="holding_lib" />
5463                                 </create>
5464                                 <retrieve permission="RECEIVE_SERIAL">
5465                                         <context link="stream" jump="distribution" field="holding_lib" />
5466                                 </retrieve>
5467                                 <update permission="ADMIN_SERIAL_STREAM">
5468                                         <context link="stream" jump="distribution" field="holding_lib" />
5469                                 </update>
5470                                 <delete permission="ADMIN_SERIAL_STREAM">
5471                                         <context link="stream" jump="distribution" field="holding_lib" />
5472                                 </delete>
5473                         </actions>
5474                 </permacrud>
5475         </class>
5476
5477         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5478                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5479                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5480                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5481                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5482                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5483                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5484                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5485                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5486                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5487                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5488                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5489                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5490                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5491                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5492                 </fields>
5493                 <links>
5494                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5495                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5496                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5497                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5498                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5499                 </links>
5500                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5501                         <actions>
5502                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5503                                         <context link="subscription" field="owning_lib" />
5504                                 </create>
5505                                 <retrieve/>
5506                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5507                                         <context link="subscription" field="owning_lib" />
5508                                 </update>
5509                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5510                                         <context link="subscription" field="owning_lib" />
5511                                 </delete>
5512                         </actions>
5513                 </permacrud>
5514         </class>
5515
5516         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5517                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5518                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5519                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5520                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5521                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5522                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5523                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5524                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5525                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5526                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5527                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5528                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5529                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5530                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5531                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5532                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5533                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5534                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5535                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5536                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5537                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5538                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5539                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5540                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5541                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5542                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5543                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5544                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5545                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5546                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5547                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5548                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5549                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5550                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5551                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5552                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5553                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5554                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5555                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5556                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5557                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5558                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5559                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5560                 </fields>
5561                 <links>
5562                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5563                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5564                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5565                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5566                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5567                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5568                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5569                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5570                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5571                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5572                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5573                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5574                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5575                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5576                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5577                 </links>
5578                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5579                         <actions>
5580                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5581                                 <retrieve/>
5582                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5583                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5584                         </actions>
5585                 </permacrud>
5586         </class>
5587
5588         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5589                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5590                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5591                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5592                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5593                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5594                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5595                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5596                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5597                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5598                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5599                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5600                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5601                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5602                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5603                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5604                 </fields>
5605                 <links>
5606                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5607                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5608                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5609                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5610                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5611                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5612                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5613                 </links>
5614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5615                         <actions>
5616                                 <create permission="ADMIN_SERIAL_ITEM">
5617                                         <context link="stream" jump="distribution" field="holding_lib" />
5618                                 </create>
5619                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5620                                         <context link="stream" jump="distribution" field="holding_lib" />
5621                                 </retrieve>
5622                                 <update permission="ADMIN_SERIAL_ITEM">
5623                                         <context link="stream" jump="distribution" field="holding_lib" />
5624                                 </update>
5625                                 <delete permission="ADMIN_SERIAL_ITEM">
5626                                         <context link="stream" jump="distribution" field="holding_lib" />
5627                                 </delete>
5628                         </actions>
5629                 </permacrud>
5630         </class>
5631
5632         <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">
5633                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5634                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5635                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5636                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5637                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5638                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5639                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5640                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5641                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5642                 </fields>
5643                 <links>
5644                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5645                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5646                 </links>
5647                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5648                         <actions>
5649                                 <create permission="ADMIN_SERIAL_ITEM">
5650                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5651                                 </create>
5652                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5653                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5654                                 </retrieve>
5655                                 <update permission="ADMIN_SERIAL_ITEM">
5656                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5657                                 </update>
5658                                 <delete permission="ADMIN_SERIAL_ITEM">
5659                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5660                                 </delete>
5661                         </actions>
5662                 </permacrud>
5663         </class>
5664         <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">
5665                 <fields>
5666                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5667                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5668                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5669                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5670                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5671                 </fields>
5672                 <links>
5673                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5674                 </links>
5675         </class>
5676         <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">
5677                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5678                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5679                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5680                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5681                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5682                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5683                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5684                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5685                 </fields>
5686                 <links>
5687                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5688                 </links>
5689         </class>
5690         <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">
5691                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5692                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5693                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5694                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5695                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5696                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5697                 </fields>
5698                 <links>
5699                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5700                 </links>
5701                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5702                         <actions>
5703                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5704                                         <context link="distribution" field="holding_lib" />
5705                                 </create>
5706                                 <retrieve/>
5707                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5708                                         <context link="distribution" field="holding_lib" />
5709                                 </update>
5710                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5711                                         <context link="distribution" field="holding_lib" />
5712                                 </delete>
5713                         </actions>
5714                 </permacrud>
5715         </class>
5716
5717         <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">
5718                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5719                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5720                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5721                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5722                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5723                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5724                 </fields>
5725                 <links>
5726                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5727                 </links>
5728                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5729                         <actions>
5730                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5731                                         <context link="distribution" field="holding_lib" />
5732                                 </create>
5733                                 <retrieve/>
5734                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5735                                         <context link="distribution" field="holding_lib" />
5736                                 </update>
5737                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5738                                         <context link="distribution" field="holding_lib" />
5739                                 </delete>
5740                         </actions>
5741                 </permacrud>
5742         </class>
5743
5744         <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">
5745                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5746                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5747                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5748                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5749                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5750                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5751                 </fields>
5752                 <links>
5753                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5754                 </links>
5755                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5756                         <actions>
5757                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5758                                         <context link="distribution" field="holding_lib" />
5759                                 </create>
5760                                 <retrieve/>
5761                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5762                                         <context link="distribution" field="holding_lib" />
5763                                 </update>
5764                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5765                                         <context link="distribution" field="holding_lib" />
5766                                 </delete>
5767                         </actions>
5768                 </permacrud>
5769         </class>
5770
5771         <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">
5772                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
5773                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5774                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5775                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
5776                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
5777                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
5778                 </fields>
5779                 <links>
5780                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5781                 </links>
5782                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5783                         <actions>
5784                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5785                                 <retrieve/>
5786                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5787                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5788                         </actions>
5789                 </permacrud>
5790         </class>
5791
5792         <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">
5793                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5794                         <field name="id" reporter:datatype="id" />
5795                         <field name="owning_copy" reporter:datatype="link"/>
5796                         <field name="stat_cat" reporter:datatype="link"/>
5797                         <field name="stat_cat_entry" reporter:datatype="link"/>
5798                 </fields>
5799                 <links>
5800                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5801                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5802                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5803                 </links>
5804                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5805                         <actions>
5806                                 <retrieve/>
5807                         </actions>
5808                 </permacrud>
5809         </class>
5810         <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">
5811                 <fields oils_persist:primary="code">
5812                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5813                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5814                 </fields>
5815                 <links/>
5816         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5817             <actions>
5818                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5819                 <retrieve/>
5820                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5821                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5822             </actions>
5823         </permacrud>
5824         </class>
5825         <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">
5826                 <fields oils_persist:primary="code">
5827                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5828                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5829                 </fields>
5830                 <links/>
5831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5832             <actions>
5833                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5834                 <retrieve/>
5835                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5836                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5837             </actions>
5838         </permacrud>
5839         </class>
5840         <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">
5841                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5842                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5843                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5844                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5845                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5846                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5847                 </fields>
5848                 <links>
5849             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5850         </links>
5851         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5852             <actions>
5853                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5854                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5855                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5856                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5857             </actions>
5858         </permacrud>
5859         </class>
5860         <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">
5861                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5862                         <field name="id" reporter:datatype="id" />
5863                         <field name="name" reporter:datatype="text"/>
5864                 </fields>
5865                 <links/>
5866         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5867             <actions>
5868                 <create permission="CREATE_LASSO" global_required="true"/>
5869                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5870                 <update permission="UPDATE_LASSO" global_required="true"/>
5871                 <delete permission="DELETE_LASSO" global_required="true"/>
5872             </actions>
5873         </permacrud>
5874         </class>
5875         <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">
5876                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5877                         <field name="id" reporter:datatype="id" />
5878                         <field name="lasso" reporter:datatype="link"/>
5879                         <field name="org_unit" reporter:datatype="org_unit"/>
5880                 </fields>
5881                 <links>
5882                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5883                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5884                 </links>
5885         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5886             <actions>
5887                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5888                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5889                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5890                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5891             </actions>
5892         </permacrud>
5893         </class>
5894         <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">
5895                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5896                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5897                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5898                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5899                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5900                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5901                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5902                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5903                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5904                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5905                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5906                 </fields>
5907                 <links>
5908                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5909                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5910                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5911                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5912                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5913                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5914                 </links>
5915         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5916             <actions>
5917                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5918                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5919                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5920                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5921             </actions>
5922         </permacrud>
5923         </class>
5924         <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">
5925                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5926                         <field name="id" reporter:datatype="id" />
5927                         <field name="from_org" reporter:datatype="org_unit"/>
5928                         <field name="to_org" reporter:datatype="org_unit"/>
5929                         <field name="prox" reporter:datatype="int" />
5930                 </fields>
5931                 <links>
5932                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5933                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5934                 </links>
5935         </class>
5936         <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">
5937                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5938                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5939                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5940                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5941                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5942                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5943                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5944                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5945                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5946                 </fields>
5947                 <links/>
5948         </class>
5949         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5950                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5951                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5952                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5953                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5954                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5955                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5956                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5957                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5958                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5959                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5960                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5961                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5962                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5963                 </fields>
5964                 <links>
5965                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5966                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5967                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5968                 </links>
5969         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5970             <actions>
5971                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5972                 <retrieve/>
5973                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5974                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5975             </actions>
5976         </permacrud>
5977         </class>
5978         <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">
5979                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5980                         <field name="address_type"  reporter:datatype="text"/>
5981                         <field name="city"  reporter:datatype="text"/>
5982                         <field name="country"  reporter:datatype="text"/>
5983                         <field name="county"  reporter:datatype="text"/>
5984                         <field name="id" reporter:datatype="id" />
5985                         <field name="org_unit" reporter:datatype="org_unit"/>
5986                         <field name="post_code"  reporter:datatype="text"/>
5987                         <field name="state"  reporter:datatype="text"/>
5988                         <field name="street1"  reporter:datatype="text"/>
5989                         <field name="street2"  reporter:datatype="text"/>
5990                         <field name="valid" reporter:datatype="bool"/>
5991                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5992                 </fields>
5993                 <links>
5994                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5995                 </links>
5996         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5997             <actions>
5998                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5999                 <retrieve/>
6000                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
6001                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
6002             </actions>
6003         </permacrud>
6004         </class>
6005         <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">
6006                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
6007                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6008                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6009                         <field name="query_text" reporter:datatype="text"/>
6010                 </fields>
6011         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6012             <actions>
6013                 <retrieve/>
6014             </actions>
6015         </permacrud>
6016         </class>
6017
6018         <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">
6019                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
6020                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6021                         <field name="owner" reporter:datatype="org_unit"/>
6022                         <field name="code" reporter:datatype="text"/>
6023                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6024                         <field name="create_date" reporter:datatype="timestamp"/>
6025                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6026                 </fields>
6027                 <links>
6028                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6029                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6030                 </links>
6031         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6032             <actions>
6033                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6034                 <retrieve/>
6035                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6036                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6037             </actions>
6038         </permacrud>
6039         </class>
6040         <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">
6041                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6042                         <field name="id" reporter:datatype="id"/>
6043                         <field name="grp" reporter:datatype="link"/>
6044                         <field name="pos" reporter:datatype="int"/>
6045                         <field name="query" reporter:datatype="link"/>
6046                 </fields>
6047                 <links>
6048                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6049                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6050                 </links>
6051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6052             <actions>
6053                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6054                     <context link="grp" field="owner"/>
6055                 </create>
6056                 <retrieve/>
6057                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6058                     <context link="grp" field="owner"/>
6059                 </update>
6060                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6061                     <context link="grp" field="owner"/>
6062                 </delete>
6063             </actions>
6064         </permacrud>
6065         </class>
6066
6067         <!-- A note: Please update alhr and ahopl when updating ahr -->
6068         <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">
6069                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6070                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6071                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6072                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6073                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6074                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6075                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6076                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6077                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6078                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6079                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6080                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6081                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6082                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6083                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6084                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6085                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6086                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6087                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6088                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6089                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6090                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6091                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6092                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6093                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6094                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6095                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6096                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6097                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6098                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6099                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6100                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6101                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6102                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6103                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6104                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6105                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6106                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6107                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6108                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6109                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6110                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6111                 </fields>
6112                 <links>
6113                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6114                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6115                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6116                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6117                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6118                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6119                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6120                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6121                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6122                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6123                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6124                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6125                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6126                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6127                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6128                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6129                 </links>
6130                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6131                         <actions>
6132                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6133                         </actions>
6134                 </permacrud>
6135         </class>
6136         <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">
6137                 <oils_persist:source_definition><![CDATA[
6138                 SELECT
6139                         ahr.*,
6140                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6141                                 copy_location_order_position,
6142                         CASE WHEN au.alias IS NOT NULL THEN
6143                                 au.alias
6144                         ELSE
6145                                 au.first_given_name
6146                         END AS usr_alias_or_first_given_name,
6147                         au.first_given_name AS usr_first_given_name,
6148                         au.second_given_name AS usr_second_given_name,
6149                         au.family_name AS usr_family_name,
6150                         au.prefix AS usr_prefix,
6151                         au.suffix AS usr_suffix,
6152                         au.alias AS usr_alias,
6153                         CASE WHEN au.alias IS NOT NULL THEN
6154                                 au.alias
6155                         ELSE
6156                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6157                                         COALESCE(au.family_name, ''),
6158                                         COALESCE(au.suffix, ''),
6159                                         ', ',
6160                                         COALESCE(au.prefix, ''),
6161                                         COALESCE(au.first_given_name, ''),
6162                                         COALESCE(au.second_given_name, '')
6163                                 ], ' '), E'\\s+,', ',')
6164                         END AS usr_alias_or_display_name,
6165                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6166                                 COALESCE(au.family_name, ''),
6167                                 COALESCE(au.suffix, ''),
6168                                 ', ',
6169                                 COALESCE(au.prefix, ''),
6170                                 COALESCE(au.first_given_name, ''),
6171                                 COALESCE(au.second_given_name, '')
6172                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6173                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6174                                 AS call_number_label,
6175                         siss.label AS issuance_label,
6176                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6177                         ahcm_1.copy_count AS potential_copies
6178                 FROM action.hold_request ahr
6179                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6180                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6181                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6182                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6183                 JOIN actor.usr au ON (au.id = ahr.usr)
6184                 JOIN (
6185                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6186                         FROM asset.copy_location
6187                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6188                 LEFT JOIN actor.usr_standing_penalty ausp 
6189                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6190                 LEFT JOIN config.standing_penalty csp
6191                         ON (
6192                                 csp.id = ausp.standing_penalty AND 
6193                                 csp.block_list LIKE '%CAPTURE%' AND (
6194                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6195                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6196                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6197                                         )
6198                                 )
6199                         )
6200                 JOIN (
6201                         SELECT COUNT(target_copy) AS copy_count, hold
6202                         FROM action.hold_copy_map
6203                         GROUP BY 2
6204                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6205                 LEFT JOIN serial.issuance siss
6206                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6207                 LEFT JOIN asset.copy_location_order acplo
6208                         ON (acp.location = acplo.location AND
6209                                 acp.circ_lib = acplo.org)
6210                 WHERE
6211                         ahr.capture_time IS NULL AND
6212                         ahr.cancel_time IS NULL AND
6213                         csp.id IS NULL AND
6214                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6215                         acp.status IN (0,7)
6216                 ]]></oils_persist:source_definition>
6217                 <fields oils_persist:primary="id">
6218                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6219                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6220                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6221                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6222                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6223                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6224                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6225                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6226                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6227                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6228                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6229                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6230                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6231                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6232                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6233                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6234                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6235                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6236                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6237                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6238                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6239                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6240                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6241                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6242                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6243                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6244                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6245                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6246                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6247                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6248                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6249                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6250                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6251                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6252                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6253                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6254                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6255                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6256                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6257                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6258                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6259                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6260                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6261                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6262                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6263                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6264                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6265                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6266                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6267                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6268                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6269                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6270                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6271                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6272                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6273                 </fields>
6274                 <links>
6275                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6276                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6277                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6278                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6279                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6280                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6281                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6282                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6283                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6284                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6285                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6286                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6287                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6288                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6289                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6290                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6291                 </links>
6292                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6293                         <actions>
6294                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6295                         </actions>
6296                 </permacrud>
6297         </class>
6298         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6299                 <oils_persist:source_definition><![CDATA[
6300                         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)
6301                 ]]></oils_persist:source_definition>
6302                 <fields oils_persist:primary="id">
6303                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6304                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6305                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6306                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6307                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6308                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6309                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6310                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6311                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6312                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6313                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6314                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6315                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6316                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6317                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6318                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6319                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6320                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6321                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6322                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6323                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6324                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6325                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6326                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6327                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6328                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6329                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6330                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6331                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6332                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6333                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6334                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6335                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6336                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6337                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6338                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6339                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6340                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6341                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6342                 </fields>
6343                 <links>
6344                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6345                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6346                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6347                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6348                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6349                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6350                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6351                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6352                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6353                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6354                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6355                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6356                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6357                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6358                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6359                 </links>
6360         </class>
6361
6362         <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">
6363                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6364                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6365                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6366                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6367                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6368                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6369                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6370                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6371                 </fields>
6372                 <links>
6373                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6374                 </links>
6375                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6376                         <actions>
6377                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6378                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6379                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6380                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6381                         </actions>
6382                 </permacrud>
6383         </class>
6384         <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">
6385                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6386                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6387                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6388                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6389                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6390                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6391                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6392                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6393                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6394                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6395                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6396                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6397                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6398                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6399                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6400                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6401                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6402                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6403                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6404                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6405                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6406                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6407                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6408                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6409                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6410                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6411                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6412                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6413                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6414                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6415                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6416                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6417                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6418                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6419                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6420                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6421                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6422                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6423                 </fields>
6424                 <links>
6425                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6426                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6427                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6428                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6429                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6430                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6431                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6432                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6433                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6434                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6435                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6436                 </links>
6437                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6438                         <actions>
6439                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6440                         </actions>
6441                 </permacrud>
6442         </class>
6443         <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">
6444                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6445                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6446                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6447                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6448                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6449                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6450                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6451                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6452                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6453                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6454                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6455                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6456                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6457                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6458                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6459                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6460                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6461                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6462                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6463                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6464                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6465                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6466                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6467                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6468                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6469                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6470                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6471                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6472                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6473                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6474                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6475                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6476                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6477                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6478                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6479                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6480                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6481                 </fields>
6482                 <links>
6483                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6484                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6485                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6486                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6487                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6488                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6489                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6490                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6491                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6492                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6493                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6494                 </links>
6495                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6496                         <actions>
6497                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6498                         </actions>
6499                 </permacrud>
6500         </class>
6501
6502         <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">
6503                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6504                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6505                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6506                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6507                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6508                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6509                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6510                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6511                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6512                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6513                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6514                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6515                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6516                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6517                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6518                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6519                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6520                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6521                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6522                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6523                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6524                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6525                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6526                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6527                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6528                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6529                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6530                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6531                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6532                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6533                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6534                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6535                 </fields>
6536                 <links>
6537                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6538                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6539                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6540                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6541                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6542                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6543                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6544                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6545                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6546                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6547                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6548                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6549                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6550                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6551                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6552                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6553                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6554                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6555                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6556                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6557                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6558                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6559                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6560                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6561                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6562                 </links>
6563         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6564             <actions>
6565                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6566                 <retrieve />
6567                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6568                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6569             </actions>
6570         </permacrud>
6571         </class>
6572         <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">
6573                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6574                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6575                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6576                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6577                 </fields>
6578                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6579                         <actions>
6580                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6581                                 <retrieve/>
6582                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6583                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6584                         </actions>
6585                 </permacrud>
6586         </class>
6587         <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">
6588                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6589                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6590                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6591                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6592                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6593                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6594                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6595                 </fields>
6596                 <links>
6597                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6598                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6599                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6600                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6601                 </links>
6602                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6603                         <actions>
6604                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6605                                 <retrieve/>
6606                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6607                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6608                         </actions>
6609                 </permacrud>
6610         </class>
6611         <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">
6612                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6613                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6614                         <field name="btype" reporter:datatype="text"/>
6615                         <field name="id" reporter:datatype="id" />
6616                         <field name="name"  reporter:datatype="text"/>
6617                         <field name="description" reporter:datatype="text"/>
6618                         <field name="owner" reporter:datatype="link"/>
6619                         <field name="pub" reporter:datatype="bool"/>
6620                         <field name="create_time" reporter:datatype="timestamp" />
6621                         <field name="owning_lib" reporter:datatype="org_unit" />
6622                 </fields>
6623                 <links>
6624                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6625                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6626                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6627                 </links>
6628                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6629                         <actions>
6630                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6631                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6632                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6633                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6634                         </actions>
6635                 </permacrud>
6636         </class>
6637         <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">
6638                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6639                         <field name="id" reporter:datatype="id" />
6640                         <field name="bucket" reporter:datatype="link"/>
6641                         <field name="note" reporter:datatype="text" />
6642                 </fields>
6643                 <links>
6644                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6645                 </links>
6646         </class>
6647         <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">
6648                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6649                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6650                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6651                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6652                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6653                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6654                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6655                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6656                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6657                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6658                 </fields>
6659                 <links>
6660                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6661                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6662                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6663                 </links>
6664                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6665                         <actions>
6666                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6667                         </actions>
6668                 </permacrud>
6669         </class>
6670         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6671                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6672                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6673                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6674                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6675                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6676                 </fields>
6677                 <links>
6678                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6679                 </links>
6680                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6681                         <actions>
6682                                 <retrieve permission="VIEW_USER">
6683                                         <context link="usr" field="home_ou" />
6684                                 </retrieve>
6685                         </actions>
6686                 </permacrud>
6687         </class>
6688     <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">
6689         <fields oils_persist:primary="field">
6690             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6691             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6692             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6693         </fields>
6694         <links/>
6695         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6696             <actions>
6697                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6698                 <retrieve />
6699                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6700                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6701             </actions>
6702         </permacrud>
6703     </class>
6704         <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">
6705                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6706                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6707                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6708                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6709                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6710                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6711                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6712                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6713                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6714                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6715                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6716                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6717                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6718                 </fields>
6719                 <links>
6720                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6721                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6722                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6723                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6724                 </links>
6725         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6726             <actions>
6727                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6728                 <retrieve />
6729                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6730                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6731             </actions>
6732         </permacrud>
6733         </class>
6734         <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">
6735                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6736                         <field name="field" reporter:datatype="link"/>
6737                         <field name="id" reporter:datatype="id" />
6738                         <field name="source" reporter:datatype="link"/>
6739                         <field name="value"  reporter:datatype="text"/>
6740                 </fields>
6741                 <links>
6742                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6743                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6744                 </links>
6745         </class>
6746         <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">
6747                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6748                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6749                         <field name="btype" reporter:datatype="text"/>
6750                         <field name="id" reporter:datatype="id" />
6751                         <field name="name"  reporter:datatype="text"/>
6752                         <field name="description" reporter:datatype="text"/>
6753                         <field name="owner" reporter:datatype="link"/>
6754                         <field name="pub" reporter:datatype="bool"/>
6755                         <field name="create_time" reporter:datatype="timestamp" />
6756                         <field name="owning_lib" reporter:datatype="org_unit" />
6757                 </fields>
6758                 <links>
6759                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6760                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6761                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6762                 </links>
6763                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6764                         <actions>
6765                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6766                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6767                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6768                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6769                         </actions>
6770                 </permacrud>
6771         </class>
6772         <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">
6773                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6774                         <field name="id" reporter:datatype="id" />
6775                         <field name="bucket" reporter:datatype="link"/>
6776                         <field name="note" reporter:datatype="text" />
6777                 </fields>
6778                 <links>
6779                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6780                 </links>
6781         </class>
6782         <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">
6783                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6784                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6785                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6786                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6787                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6788                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6789                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6790                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6791                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6792                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6793                 </fields>
6794                 <links>
6795                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6796                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6797                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6798                 </links>
6799         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6800             <actions>
6801                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6802                     <context link="xact" jump="usr" field="home_ou"/>
6803                 </retrieve>
6804                         </actions>
6805                 </permacrud>
6806         </class>
6807         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6808                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6809                         <field name="id" reporter:datatype="id" />
6810                         <field name="ind1" />
6811                         <field name="ind2" />
6812                         <field name="record" />
6813                         <field name="subfield" />
6814                         <field name="tag" />
6815                         <field name="value" />
6816                 </fields>
6817                 <links>
6818                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6819                 </links>
6820         </class>
6821         <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">
6822                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6823                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6824                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6825                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6826                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6827                 </fields>
6828                 <links>
6829                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6830                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6831                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6832                 </links>
6833         </class>
6834         <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">
6835                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6836                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6837                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6838                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6839                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6840                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6841                 </fields>
6842                 <links>
6843                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6844                 </links>
6845         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6846             <actions>
6847                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6848                 <retrieve/>
6849                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6850                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6851             </actions>
6852         </permacrud>
6853
6854         </class>
6855         <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">
6856                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6857                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6858                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6859                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6860                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6861                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6862                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6863                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6864                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6865                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6866                 </fields>
6867                 <links>
6868                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6869                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6870                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6871                 </links>
6872         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6873             <actions>
6874                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6875                 <retrieve/>
6876                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6877                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6878             </actions>
6879         </permacrud>
6880         </class>
6881         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6882                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6883                         <field name="create_date" reporter:datatype="timestamp"/>
6884                         <field name="creator" reporter:datatype="link"/>
6885                         <field name="edit_date" reporter:datatype="timestamp"/>
6886                         <field name="editor" reporter:datatype="link"/>
6887                         <field name="id" reporter:datatype="id" />
6888                         <field name="pub" reporter:datatype="bool"/>
6889                         <field name="record" reporter:datatype="link"/>
6890                         <field name="value"  reporter:datatype="text"/>
6891                 </fields>
6892                 <links>
6893                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6894                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6895                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6896                 </links>
6897         </class>
6898         <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">
6899                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6900                         <field name="balance_owed" reporter:datatype="money" />
6901                         <field name="total_owed" reporter:datatype="money" />
6902                         <field name="total_paid" reporter:datatype="money" />
6903                         <field name="usr" reporter:datatype="link"/>
6904                 </fields>
6905                 <links>
6906                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6907                 </links>
6908         </class>
6909     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6910                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6911                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6912                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6913                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6914                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6915                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6916                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6917                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6918                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6919                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6920                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6921                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6922                 </fields>
6923                 <links>
6924                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6925                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6926                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6927                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6928                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6929                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6930                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6931                 </links>
6932         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6933             <actions>
6934                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
6935             </actions>
6936         </permacrud>
6937         </class>
6938         <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">
6939                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6940                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6941                         <field name="quality" reporter:datatype="int" />
6942                         <field name="source" reporter:datatype="text"/>
6943                         <field name="transcendant" reporter:datatype="bool"/>
6944                         <field name="can_have_copies" reporter:datatype="bool"/>
6945                 </fields>
6946                 <links/>
6947         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6948             <actions>
6949                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6950                 <retrieve/>
6951                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6952                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6953             </actions>
6954         </permacrud>
6955         </class>
6956         <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">
6957                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6958                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6959                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6960                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6961                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6962                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6963                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6964                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6965                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6966                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6967                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6968                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6969                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6970                 </fields>
6971                 <links>
6972                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6973                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6974                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6975                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6976                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6977                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6978                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6979                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6980                 </links>
6981                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6982                         <actions>
6983                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6984                                         <context link="usr" field="home_ou" />
6985                                 </retrieve>
6986                         </actions>
6987                 </permacrud>
6988         </class>
6989         <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">
6990                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6991                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6992                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6993                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6994                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6995                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6996                 </fields>
6997                 <links>
6998                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6999                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7000                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
7001                 </links>
7002         </class>
7003         <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">
7004                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
7005                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
7006                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
7007                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7008                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
7009                 </fields>
7010                 <links>
7011                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7012                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7013                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
7014                 </links>
7015         </class>
7016         <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">
7017                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
7018                         <field name="bucket" reporter:datatype="link"/>
7019                         <field name="id" reporter:datatype="id" />
7020                         <field name="target_user" reporter:datatype="link"/>
7021                         <field name="create_time" reporter:datatype="timestamp" />
7022                         <field name="pos" reporter:datatype="int" />
7023                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7024                 </fields>
7025                 <links>
7026                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7027                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7028             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7029                 </links>
7030                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7031                         <actions>
7032                                 <retrieve permission="ADMIN_USER_BUCKET">
7033                     <context link="bucket" owning_lib="owning_lib"/>
7034                 </retrieve>
7035             </actions>
7036         </permacrud>
7037         </class>
7038         <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">
7039                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7040                         <field name="id" reporter:datatype="id" />
7041                         <field name="item" reporter:datatype="link"/>
7042                         <field name="note" reporter:datatype="text" />
7043                 </fields>
7044                 <links>
7045                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7046                 </links>
7047         </class>
7048         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7049                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7050                         <field name="balance_owed" reporter:datatype="money" />
7051                         <field name="total_owed" reporter:datatype="money" />
7052                         <field name="total_paid" reporter:datatype="money" />
7053                         <field name="usr" reporter:datatype="link"/>
7054                 </fields>
7055                 <links>
7056                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7057                 </links>
7058         </class>
7059         <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">
7060                 <fields oils_persist:primary="code" oils_persist:sequence="">
7061                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7062                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7063                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7064                 </fields>
7065                 <links/>
7066         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7067             <actions>
7068                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7069                 <retrieve/>
7070                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7071                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7072             </actions>
7073         </permacrud>
7074         </class>
7075         <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">
7076                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7077                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7078                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7079                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7080                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7081                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7082                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7083                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7084                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7085                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7086                 </fields>
7087                 <links>
7088                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7089                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7090                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7091                 </links>
7092         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7093             <actions>
7094                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7095                     <context link="xact" jump="usr" field="home_ou"/>
7096                 </retrieve>
7097                         </actions>
7098                 </permacrud>
7099         </class>
7100         <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">
7101                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7102                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7103                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7104                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7105                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7106                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7107                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7108                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7109                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7110                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7111                 </fields>
7112                 <links>
7113                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7114                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7115                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7116                 </links>
7117         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7118             <actions>
7119                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7120                     <context link="xact" jump="usr" field="home_ou"/>
7121                 </retrieve>
7122                         </actions>
7123                 </permacrud>
7124         </class>
7125         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7126                 <fields oils_persist:primary="id" oils_persist:sequence="">
7127                         <field name="checkin_lib" reporter:datatype="link"/>
7128                         <field name="checkin_staff" reporter:datatype="link"/>
7129                         <field name="checkin_time" reporter:datatype="timestamp"/>
7130                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7131                         <field name="circ_staff" reporter:datatype="link"/>
7132                         <field name="desk_renewal" reporter:datatype="bool"/>
7133                         <field name="due_date" reporter:datatype="timestamp"/>
7134                         <field name="duration" reporter:datatype="interval"/>
7135                         <field name="duration_rule" reporter:datatype="link"/>
7136                         <field name="fine_interval" reporter:datatype="interval"/>
7137                         <field name="id" reporter:datatype="id" />
7138                         <field name="max_fine" reporter:datatype="money" />
7139                         <field name="max_fine_rule" reporter:datatype="link"/>
7140                         <field name="opac_renewal" reporter:datatype="bool"/>
7141                         <field name="phone_renewal" reporter:datatype="bool"/>
7142                         <field name="recurring_fine" reporter:datatype="money" />
7143                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7144                         <field name="renewal_remaining" reporter:datatype="int" />
7145             <field name="grace_period" reporter:datatype="interval" />
7146                         <field name="stop_fines" reporter:datatype="text"/>
7147                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7148                         <field name="target_copy" reporter:datatype="link"/>
7149                         <field name="usr" reporter:datatype="link"/>
7150                         <field name="xact_finish" reporter:datatype="timestamp" />
7151                         <field name="xact_start" reporter:datatype="timestamp" />
7152                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7153                 </fields>
7154                 <links>
7155                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7156                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7157                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7158                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7159                 </links>
7160         </class>
7161         <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">
7162                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7163                         <field name="field" reporter:datatype="link"/>
7164                         <field name="id" reporter:datatype="id" />
7165                         <field name="source" reporter:datatype="link"/>
7166                         <field name="value" reporter:datatype="text"/>
7167                 </fields>
7168                 <links>
7169                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7170                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7171                 </links>
7172         </class>
7173         <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">
7174                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7175                         <field name="high" reporter:datatype="money" />
7176                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7177                         <field name="low" reporter:datatype="money" />
7178                         <field name="name" reporter:datatype="text"/>
7179                         <field name="normal" reporter:datatype="money" />
7180                         <field name="recurrence_interval" reporter:datatype="interval"/>
7181             <field name="grace_period" reporter:datatype="interval" />
7182                 </fields>
7183                 <links/>
7184         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7185             <actions>
7186                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7187                 <retrieve/>
7188                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7189                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7190             </actions>
7191         </permacrud>
7192         </class>
7193         <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">
7194                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7195                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7196                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7197                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7198                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7199                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7200                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7201                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7202                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7203                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7204                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7205                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7206                 </fields>
7207                 <links>
7208                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7209                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7210                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7211                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7212                 </links>
7213         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7214             <actions>
7215                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7216                     <context link="xact" jump="usr" field="home_ou"/>
7217                 </retrieve>
7218                         </actions>
7219                 </permacrud>
7220         </class>
7221         <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">
7222                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7223                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7224                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7225                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7226                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7227                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="link"/>
7228                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7229                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7230                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7231                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7232                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7233                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7234                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7235                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7236                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7237                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7238                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7239                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7240                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7241                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7242                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7243                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7244                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7245                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
7246                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7247                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7248                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7249                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7250                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7251                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7252                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7253                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7254                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7255                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7256                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7257                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7258                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7259                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7260                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7261                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7262                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7263                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7264                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7265                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7266                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7267                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7268                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7269                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7270                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7271                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
7272                 </fields>
7273                 <links>
7274                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7275                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7276                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7277                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7278                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7279                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7280                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7281                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7282                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7283                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7284                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7285                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7286                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7287                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7288                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7289                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7290                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7291                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7292                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7293                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7294                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7295                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7296                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7297                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7298                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
7299                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7300                 </links>
7301         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7302             <actions>
7303                 <create permission="CREATE_COPY">
7304                     <context link="call_number" field="owning_lib"/>
7305                 </create>
7306                 <retrieve/>
7307                 <update permission="UPDATE_COPY">
7308                     <context link="call_number" field="owning_lib"/>
7309                 </update>
7310                 <delete permission="DELETE_COPY">
7311                     <context link="call_number" field="owning_lib"/>
7312                 </delete>
7313             </actions>
7314         </permacrud>
7315         </class>
7316
7317         <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">
7318                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
7319                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
7320                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
7321                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7322                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7323                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7324                         <field reporter:label="Event" name="event" reporter:datatype="text" />
7325                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
7326                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
7327                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
7328                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
7329                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
7330                 </fields>
7331                 <links>
7332                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
7333                 </links>
7334         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7335             <actions>
7336                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7337                 <retrieve/>
7338                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7339                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
7340             </actions>
7341         </permacrud>
7342         </class>
7343
7344         <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">
7345                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
7346                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7347                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
7348                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7349                 </fields>
7350                 <links>
7351                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7352                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7353                 </links>
7354         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7355             <actions>
7356                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7357                 <retrieve/>
7358                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7359                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
7360             </actions>
7361         </permacrud>
7362         </class>
7363
7364         <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">
7365                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
7366                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7367                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7368                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7369                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7370                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7371                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7372                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7373                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7374                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7375                 </fields>
7376                 <links>
7377                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7378                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7379                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7380                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7381                 </links>
7382         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7383             <actions>
7384                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
7385                     <context link="copy" field="circ_lib"/>
7386                 </create>
7387                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
7388                     <context link="copy" field="circ_lib"/>
7389                                 </retrieve>
7390                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
7391                     <context link="copy" field="circ_lib"/>
7392                                 </update>
7393                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
7394                     <context link="copy" field="circ_lib"/>
7395                                 </delete>
7396             </actions>
7397         </permacrud>
7398         </class>
7399
7400         <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">
7401                 <fields oils_persist:primary="id">
7402                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7403                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7404                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7405                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7406                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7407                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7408                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7409                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7410                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7411                 </fields>
7412                 <links>
7413                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7414                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7415                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7416                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7417                 </links>
7418         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7419             <actions>
7420                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
7421                     <context link="copy" field="circ_lib"/>
7422                 </create>
7423                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
7424                     <context link="copy" field="circ_lib"/>
7425                                 </retrieve>
7426                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
7427                     <context link="copy" field="circ_lib"/>
7428                                 </update>
7429                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
7430                     <context link="copy" field="circ_lib"/>
7431                                 </delete>
7432             </actions>
7433         </permacrud>
7434         </class>
7435
7436         <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">
7437                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
7438                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
7439                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
7440                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7441                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7442                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7443                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7444                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7445                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
7446                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
7447                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7448                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7449                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7450                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
7451                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
7452                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
7453                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
7454                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
7455                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
7456                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
7457                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
7458                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
7459                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7460                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7461                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7462                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7463                 </fields>
7464                 <links>
7465                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7466                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7467                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7468                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7469                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7470                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7471                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7472                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7473                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7474                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7475                 </links>
7476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7477                         <actions>
7478                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7479                                 <retrieve />
7480                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7481                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7482                         </actions>
7483                 </permacrud>
7484         </class>
7485
7486         <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">
7487                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7488                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7489                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7490                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7491                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7492                 </fields>
7493                 <links/>
7494         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7495             <actions>
7496                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7497                 <retrieve/>
7498                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7499                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7500             </actions>
7501         </permacrud>
7502         </class>
7503         <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">
7504                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7505                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7506                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7507                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7508                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7509                 </fields>
7510                 <links/>
7511         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7512             <actions>
7513                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7514                 <retrieve/>
7515                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7516                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7517             </actions>
7518         </permacrud>
7519         </class>
7520         <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">
7521                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7522                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7523                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7524                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7525                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7526                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7527                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7528                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7529                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7530                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7531                 </fields>
7532                 <links>
7533                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7534                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7535                 </links>
7536         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7537             <actions>
7538                 <create permission="CREATE_PERM" global_required="true"/>
7539                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7540                 <update permission="UPDATE_PERM" global_required="true"/>
7541                 <delete permission="DELETE_PERM" global_required="true"/>
7542             </actions>
7543         </permacrud>
7544         </class>
7545         <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">
7546                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7547                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7548                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7549                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7550                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7551                 </fields>
7552                 <links>
7553                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7554                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7555                 </links>
7556         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7557             <actions>
7558                 <create permission="ADMIN_SURVEY">
7559                     <context link="question" jump="survey" field="owner"/>
7560                 </create>
7561                 <retrieve/>
7562                 <update permission="ADMIN_SURVEY">
7563                     <context link="question" jump="survey" field="owner"/>
7564                 </update>
7565                 <delete permission="ADMIN_SURVEY">
7566                     <context link="question" jump="survey" field="owner"/>
7567                 </delete>
7568             </actions>
7569         </permacrud>
7570         </class>
7571         <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">
7572                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7573                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7574                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7575                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7576                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7577                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7578                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7579                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7580                 </fields>
7581                 <links>
7582                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7583                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7584                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7585                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7586                 </links>
7587                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7588                         <actions>
7589                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7590                         </actions>
7591                 </permacrud>
7592         </class>
7593         <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">
7594                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7595                         <field name="balance_owed" reporter:datatype="money" />
7596                         <field name="total_owed" reporter:datatype="money" />
7597                         <field name="total_paid" reporter:datatype="money" />
7598                         <field name="usr" reporter:datatype="link"/>
7599                 </fields>
7600                 <links>
7601                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7602                 </links>
7603         </class>
7604         <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">
7605                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7606                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7607                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7608                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7609                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7610                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7611                 </fields>
7612                 <links>
7613                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7614                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7615                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7616                 </links>
7617         </class>
7618         <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">
7619                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7620                         <field name="field" reporter:datatype="link"/>
7621                         <field name="id" reporter:datatype="id" />
7622                         <field name="source" reporter:datatype="link"/>
7623                         <field name="value" reporter:datatype="text"/>
7624                 </fields>
7625                 <links>
7626                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7627                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7628                 </links>
7629         </class>
7630         <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">
7631                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7632                         <field name="field" reporter:datatype="link"/>
7633                         <field name="id" reporter:datatype="id" />
7634                         <field name="source" reporter:datatype="link"/>
7635                         <field name="value" reporter:datatype="text"/>
7636                 </fields>
7637                 <links>
7638                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7639                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7640                 </links>
7641         </class>
7642         <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">
7643                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7644                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7645                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7646                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7647                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7648                 </fields>
7649                 <links>
7650                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7651                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7652                 </links>
7653         </class>
7654         <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">
7655                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7656                         <field name="depth" reporter:datatype="int" />
7657                         <field name="grantable" reporter:datatype="bool"/>
7658                         <field name="grp" reporter:datatype="link"/>
7659                         <field name="id" reporter:datatype="id" />
7660                         <field name="perm" reporter:datatype="link"/>
7661                 </fields>
7662                 <links>
7663                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7664                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7665                 </links>
7666         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7667             <actions>
7668                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7669                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7670                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7671                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7672             </actions>
7673         </permacrud>
7674         </class>
7675         <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">
7676                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7677                         <field name="items" oils_persist:virtual="true" />
7678                         <field name="btype" reporter:datatype="text"/>
7679                         <field name="id" reporter:datatype="id" />
7680                         <field name="name" reporter:datatype="text"/>
7681                         <field name="description" reporter:datatype="text"/>
7682                         <field name="owner" reporter:datatype="link"/>
7683                         <field name="pub" reporter:datatype="bool"/>
7684                         <field name="create_time" reporter:datatype="timestamp" />
7685                         <field name="owning_lib" reporter:datatype="org_unit" />
7686                 </fields>
7687                 <links>
7688                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7689                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7690                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7691                 </links>
7692                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7693                         <actions>
7694                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7695                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7696                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7697                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7698                         </actions>
7699                 </permacrud>
7700         </class>
7701         <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">
7702                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7703                         <field name="id" reporter:datatype="id" />
7704                         <field name="bucket" reporter:datatype="link"/>
7705                         <field name="note" reporter:datatype="text" />
7706                 </fields>
7707                 <links>
7708                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7709                 </links>
7710         </class>
7711         <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">
7712                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7713                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
7714                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7715                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
7716                 </fields>
7717                 <links>
7718                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7719                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7720                 </links>
7721         </class>
7722         <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">
7723                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7724                         <field name="depth" reporter:datatype="int"/>
7725                         <field name="grantable" reporter:datatype="bool"/>
7726                         <field name="id" reporter:datatype="id" />
7727                         <field name="perm" reporter:datatype="link"/>
7728                         <field name="usr" reporter:datatype="link"/>
7729                 </fields>
7730                 <links>
7731                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7732                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7733                 </links>
7734         </class>
7735         <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">
7736                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7737                         <field name="object_id" reporter:datatype="text"/>
7738                         <field name="grantable" reporter:datatype="bool"/>
7739                         <field name="id" reporter:datatype="id" />
7740                         <field name="perm" reporter:datatype="link"/>
7741                         <field name="usr" reporter:datatype="link"/>
7742                         <field name="object_type" reporter:datatype="text"/>
7743                 </fields>
7744                 <links>
7745                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7746                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7747                 </links>
7748         </class>
7749         <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">
7750                 <fields oils_persist:primary="id" oils_persist:sequence="">
7751                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7752                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7753                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7754                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7755                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7756                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7757                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7758                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7759                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7760                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7761                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7762                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7763                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7764                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7765                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7766                 </fields>
7767                 <links>
7768                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7769                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7770                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7771                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7772                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7773                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7774                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7775                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7776                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7777                 </links>
7778         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7779             <actions>
7780                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7781                     <context link="xact" jump="usr" field="home_ou"/>
7782                 </retrieve>
7783                         </actions>
7784                 </permacrud>
7785         </class>
7786         <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">
7787                 <fields oils_persist:primary="id" oils_persist:sequence="">
7788                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7789                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7790                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7791                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7792                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7793                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7794                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7795                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7796                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7797                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7798                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7799                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7800                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7801                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7802                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7803                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7804                 </fields>
7805                 <links>
7806                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7807                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7808                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7809                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7810                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7811                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7812                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7813                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7814                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7815                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7816                 </links>
7817                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7818                         <actions>
7819                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7820                                         <context link="xact" jump="usr" field="home_ou"/>
7821                                 </retrieve>
7822                         </actions>
7823                 </permacrud>
7824         </class>
7825         <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">
7826                 <fields oils_persist:primary="id" oils_persist:sequence="">
7827                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7828                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7829                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7830                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7831                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7832                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7833                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7834                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7835                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7836                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7837                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7838                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7839                 </fields>
7840                 <links>
7841                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7842                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7843                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7844                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7845                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7846                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7847                 </links>
7848         </class>
7849         <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">
7850                 <fields oils_persist:primary="id" oils_persist:sequence="">
7851                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7852                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7853                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7854                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7855                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7856                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7857                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7858                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7859                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7860                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7861                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7862                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7863                 </fields>
7864                 <links>
7865                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7866                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7867                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7868                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7869                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7870                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7871                 </links>
7872         </class>
7873         <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">
7874                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7875                         <field name="bucket" reporter:datatype="link"/>
7876                         <field name="id" reporter:datatype="id" />
7877                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7878                         <field name="create_time" reporter:datatype="timestamp" />
7879                         <field name="pos" reporter:datatype="int" />
7880                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7881                 </fields>
7882                 <links>
7883                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7884                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7885             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7886                 </links>
7887                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7888                         <actions>
7889                                 <retrieve permission="ADMIN_COPY_BUCKET">
7890                     <context link="bucket" owning_lib="owning_lib"/>
7891                 </retrieve>
7892             </actions>
7893         </permacrud>
7894         </class>
7895         <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">
7896                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7897                         <field name="id" reporter:datatype="id" />
7898                         <field name="item" reporter:datatype="link"/>
7899                         <field name="note" reporter:datatype="text" />
7900                 </fields>
7901                 <links>
7902                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7903                 </links>
7904         </class>
7905         <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">
7906                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7907                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7908                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7909                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7910                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7911                 </fields>
7912                 <links>
7913                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7914                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7915                 </links>
7916                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7917                         <actions>
7918                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7919                         </actions>
7920                 </permacrud>
7921         </class>
7922     <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">
7923         <fields oils_persist:primary="field">
7924             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7925             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7926             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7927         </fields>
7928         <links/>
7929         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7930             <actions>
7931                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7932                 <retrieve />
7933                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7934                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7935             </actions>
7936         </permacrud>
7937     </class>
7938         <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">
7939                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7940                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7941                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7942                 </fields>
7943                 <links/>
7944         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7945             <actions>
7946                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7947                 <retrieve/>
7948                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7949                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7950             </actions>
7951         </permacrud>
7952         </class>
7953
7954
7955         <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">
7956                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7957                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7958                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7959                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7960                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7961                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7962                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7963                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7964                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7965                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7966                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7967                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7968                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7969                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7970                 </fields>
7971                 <links>
7972                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7973                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7974                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7975                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7976                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7977                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7978                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7979                 </links>
7980         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7981             <actions>
7982                 <create permission="TRANSIT_COPY">
7983                     <context link="target_copy" field="owner"/>
7984                 </create>
7985                 <retrieve/>
7986                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7987                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7988             </actions>
7989         </permacrud>
7990         </class>
7991         <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">
7992                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7993                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7994                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7995                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7996                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7997                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7998                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7999                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8000                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8001                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8002                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8003                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8004                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8005                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8006                 </fields>
8007                 <links>
8008                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8009                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8010                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8011                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8012                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8013                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8014                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8015                 </links>
8016         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8017             <actions>
8018                 <create permission="TRANSIT_COPY" context_field="owner">
8019                     <context link="target_copy" field="circ_lib"/>
8020                 </create>
8021                 <retrieve/>
8022                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8023                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8024             </actions>
8025         </permacrud>
8026         </class>
8027         <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">
8028                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8029                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8030                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8031                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8032                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8033                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8034                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8035                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8036                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8037                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8038                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8039                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8040                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8041                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8042                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8043                 </fields>
8044                 <links>
8045                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8046                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8047                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8048                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8049                 </links>
8050         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8051             <actions>
8052                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8053                     <context link="xact" jump="usr" field="home_ou"/>
8054                 </retrieve>
8055                         </actions>
8056                 </permacrud>
8057         </class>
8058         <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">
8059                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8060                         <field name="grp" />
8061                         <field name="id" reporter:datatype="id" />
8062                         <field name="usr" />
8063                 </fields>
8064                 <links>
8065                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8066                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8067                 </links>
8068         </class>
8069         <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">
8070                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8071                         <field name="id" reporter:datatype="id" />
8072                         <field name="fq_field" reporter:datatype="text"/>
8073                         <field name="identity_value" reporter:datatype="text"/>
8074                         <field name="translation" reporter:datatype="text"/>
8075                         <field name="string" reporter:datatype="text"/>
8076                 </fields>
8077                 <links>
8078                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
8079                 </links>
8080         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8081             <actions>
8082                 <create permission="CREATE_TRANSLATION" global_required="true"/>
8083                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
8084                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
8085                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
8086             </actions>
8087         </permacrud>
8088         </class>
8089         <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">
8090                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
8091                         <field name="id" reporter:datatype="id" />
8092                         <field name="fm_class" reporter:datatype="text"/>
8093                         <field name="field" reporter:datatype="text"/>
8094                         <field name="owner" reporter:datatype="org_unit"/>
8095                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
8096                 </fields>
8097                 <links>
8098                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8099                 </links>
8100         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8101             <actions>
8102                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8103                 <retrieve/>
8104                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8105                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8106             </actions>
8107         </permacrud>
8108         </class>
8109         <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">
8110                 <fields oils_persist:primary="code">
8111                         <field name="code" reporter:datatype="id" />
8112                         <field name="marc_code" reporter:datatype="text"/>
8113                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8114                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8115                         <field name="rtl" reporter:datatype="bool"/>
8116                 </fields>
8117                 <links/>
8118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8119             <actions>
8120                 <create permission="CREATE_LOCALE" global_required="true"/>
8121                 <retrieve/>
8122                 <update permission="UPDATE_LOCALE" global_required="true"/>
8123                 <delete permission="DELETE_LOCALE" global_required="true"/>
8124             </actions>
8125         </permacrud>
8126         </class>
8127         <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">
8128                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
8129                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
8130                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
8131                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
8132             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
8133                 </fields>
8134                 <links>
8135                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8136                 </links>
8137         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8138             <actions>
8139                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
8140                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
8141                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
8142                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
8143             </actions>
8144         </permacrud>
8145         </class>
8146
8147         <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">
8148                 <fields oils_persist:primary="id">
8149                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8150                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8151                 </fields>
8152                 <links/>
8153         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8154             <actions>
8155                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8156                 <retrieve/>
8157                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8158                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8159             </actions>
8160         </permacrud>
8161         </class>
8162
8163         <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">
8164                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
8165                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8166                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8167                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8168                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8169                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8170                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8171                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8172                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8173                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8174                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8175                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8176                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8177                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8178                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8179                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8180                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8181                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8182                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8183                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8184                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8185                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8186                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8187                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8188                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8189                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8190                 </fields>
8191                 <links>
8192                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8193                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8194                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8195                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8196                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8197                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8198                 </links>
8199         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8200             <actions>
8201                 <create permission="user_request.create">
8202                     <context link="usr" field="home_ou"/>
8203                                 </create>
8204                 <retrieve permission="user_request.view">
8205                     <context link="usr" field="home_ou"/>
8206                                 </retrieve>
8207                 <update permission="user_request.update">
8208                     <context link="usr" field="home_ou"/>
8209                                 </update>
8210                 <delete permission="user_request.delete">
8211                     <context link="usr" field="home_ou"/>
8212                                 </delete>
8213             </actions>
8214         </permacrud>
8215         </class>
8216
8217         <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">
8218                 <fields oils_persist:primary="code">
8219                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
8220                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8221                 </fields>
8222                 <links/>
8223         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8224             <actions>
8225                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8226                 <retrieve/>
8227                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8228                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8229             </actions>
8230         </permacrud>
8231         </class>
8232
8233         <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">
8234                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
8235                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
8236                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
8237                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
8238                         <field reporter:label="Ratio" name="ratio" />
8239                 </fields>
8240                 <links>
8241                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
8242                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
8243                 </links>
8244                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8245                         <actions>
8246                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8247                                 <retrieve/>
8248                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8249                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8250                         </actions>
8251                 </permacrud>
8252         </class>
8253
8254         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
8255                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
8256                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8257                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8258                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8259                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8260                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8261                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
8262                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
8263                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
8264                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
8265                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8266                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8267                         <field reporter:label="URL" name="url" reporter:datatype="text" />
8268                         <field reporter:label="Email" name="email" reporter:datatype="text" />
8269                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
8270                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
8271                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
8272                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
8273                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
8274                 </fields>
8275                 <links>
8276                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8277                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8278             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
8279             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
8280                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
8281                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
8282                 </links>
8283         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8284             <actions>
8285                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
8286                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
8287                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
8288                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
8289             </actions>
8290         </permacrud>
8291         </class>
8292
8293         <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">
8294                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
8295                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8296                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8297                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8298                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8299                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8300                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8301                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8302                 </fields>
8303                 <links>
8304                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8305                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8306                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8307                 </links>
8308         </class>
8309
8310         <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">
8311                 <fields oils_persist:primary="code">
8312                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
8313                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8314                 </fields>
8315                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8316             <actions>
8317                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8318                 <retrieve/>
8319                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8320                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8321             </actions>
8322                 </permacrud>
8323         </class>
8324
8325         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
8326                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
8327                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
8328                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
8329                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8330                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
8331                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
8332                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
8333                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
8334                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
8335                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
8336                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
8337                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8338                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
8339                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
8340                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
8341                 </fields>
8342                 <links>
8343                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
8344                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8345                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
8346                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
8347                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
8348                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
8349                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
8350                 </links>
8351         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8352             <actions>
8353                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
8354                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
8355                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
8356                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
8357             </actions>
8358         </permacrud>
8359         </class>
8360
8361         <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">
8362                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
8363                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8364                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8365                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8366                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
8367                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
8368                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
8369                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8370                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
8371                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8372                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8373                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8374                 </fields>
8375                 <links>
8376                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8377                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8378                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8379                 </links>
8380         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8381             <actions>
8382                 <create   permission="ADMIN_INVOICE">
8383                                         <context link="invoice" field="receiver"/>
8384                                 </create>
8385                 <retrieve permission="ADMIN_INVOICE">
8386                                         <context link="invoice" field="receiver"/>
8387                                 </retrieve>
8388                 <update   permission="ADMIN_INVOICE">
8389                                         <context link="invoice" field="receiver"/>
8390                                 </update>
8391                                 <delete   permission="ADMIN_INVOICE">
8392                                         <context link="invoice" field="receiver"/>
8393                                 </delete>
8394             </actions>
8395         </permacrud>
8396         </class>
8397
8398         <class id="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">
8399                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
8400                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8401                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8402                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8403                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8404                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
8405                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
8406                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8407                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8408                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8409                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8410                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8411                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8412                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
8413                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8414                 </fields>
8415                 <links>
8416                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8417                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8418                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8419                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8420                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8421                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
8422                 </links>
8423         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8424             <actions>
8425                 <create   permission="ADMIN_INVOICE">
8426                                         <context link="invoice" field="receiver"/>
8427                                 </create>
8428                 <retrieve permission="ADMIN_INVOICE">
8429                                         <context link="invoice" field="receiver"/>
8430                                 </retrieve>
8431                 <update   permission="ADMIN_INVOICE">
8432                                         <context link="invoice" field="receiver"/>
8433                                 </update>
8434                                 <delete   permission="ADMIN_INVOICE">
8435                                         <context link="invoice" field="receiver"/>
8436                                 </delete>
8437             </actions>
8438         </permacrud>
8439         </class>
8440
8441         <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">
8442                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
8443                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
8444                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8445                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8446                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8447                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8448                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8449                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
8450                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8451                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
8452                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
8453                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
8454                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8455                 </fields>
8456                 <links>
8457                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8458                 </links>
8459         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8460             <actions>
8461                 <create permission="ADMIN_PROVIDER">
8462                     <context link="provider" field="owner"/>
8463                 </create>
8464                 <retrieve permission="ADMIN_PROVIDER">
8465                     <context link="provider" field="owner"/>
8466                 </retrieve>
8467                 <update permission="ADMIN_PROVIDER">
8468                     <context link="provider" field="owner"/>
8469                 </update>
8470                 <delete permission="ADMIN_PROVIDER">
8471                     <context link="provider" field="owner"/>
8472                 </delete>
8473             </actions>
8474         </permacrud>
8475         </class>
8476
8477         <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">
8478                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
8479                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8480                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8481                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8482                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
8483                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
8484                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
8485         </fields>
8486                 <links>
8487                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8488                 </links>
8489         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8490             <actions>
8491                 <create permission="ADMIN_PROVIDER">
8492                     <context link="provider" field="owner"/>
8493                 </create>
8494                 <retrieve permission="ADMIN_PROVIDER">
8495                     <context link="provider" field="owner"/>
8496                 </retrieve>
8497                 <update permission="ADMIN_PROVIDER">
8498                     <context link="provider" field="owner"/>
8499                 </update>
8500                 <delete permission="ADMIN_PROVIDER">
8501                     <context link="provider" field="owner"/>
8502                 </delete>
8503             </actions>
8504         </permacrud>
8505     </class>
8506         <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">
8507                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
8508                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
8509                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8510                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8511                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8512                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
8513                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8514                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8515                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
8516                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
8517                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
8518                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
8519                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8520                 </fields>
8521                 <links>
8522                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
8523                 </links>
8524         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8525             <actions>
8526                 <create permission="ADMIN_PROVIDER">
8527                     <context link="contact" jump='provider' field="owner"/>
8528                 </create>
8529                 <retrieve permission="ADMIN_PROVIDER">
8530                     <context link="contact" jump='provider' field="owner"/>
8531                 </retrieve>
8532                 <update permission="ADMIN_PROVIDER">
8533                     <context link="contact" jump='provider' field="owner"/>
8534                 </update>
8535                 <delete permission="ADMIN_PROVIDER">
8536                     <context link="contact" jump='provider' field="owner"/>
8537                 </delete>
8538             </actions>
8539         </permacrud>
8540         </class>
8541
8542         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
8543                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
8544                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
8545                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
8546                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
8547                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
8548                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
8549                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
8550                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
8551                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8552                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
8553                 </fields>
8554                 <links>
8555                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
8556                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
8557                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
8558                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8559                 </links>
8560         </class>
8561
8562         <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">
8563                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
8564                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8565                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
8566                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
8567                 </fields>
8568                 <links>
8569             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
8570                 </links>
8571                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8572                         <actions>
8573                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8574                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8575                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8576                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8577                         </actions>
8578                 </permacrud>
8579         </class>
8580
8581         <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">
8582                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
8583                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
8584                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
8585                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
8586                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
8587                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
8588                 </fields>
8589                 <links>
8590                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
8591                 </links>
8592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8593                         <actions>
8594                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8595                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8596                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8597                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8598                         </actions>
8599                 </permacrud>
8600         </class>
8601
8602         <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">
8603                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
8604                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8605                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8606                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8607                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8608                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8609                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8610                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8611                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
8612                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
8613                 </fields>
8614                 <links>
8615                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8616                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8617             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
8618             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
8619                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
8620                 </links>
8621         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8622             <actions>
8623                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8624                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
8625                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8626                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8627             </actions>
8628         </permacrud>
8629         </class>
8630
8631         <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">
8632                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8633                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8634                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8635                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8636                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8637                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8638                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8639                 </fields>
8640                 <links>
8641                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8642                 </links>
8643                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8644                         <actions>
8645                                 <create permission="ADMIN_FUNDING_SOURCE">
8646                     <context link="funding_source" field="owner"/>
8647                 </create>
8648                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8649                     <context link="funding_source" field="owner"/>
8650                 </retrieve>
8651                                 <update permission="ADMIN_FUNDING_SOURCE">
8652                     <context link="funding_source" field="owner"/>
8653                 </update>
8654                                 <delete permission="ADMIN_FUNDING_SOURCE">
8655                     <context link="funding_source" field="owner"/>
8656                 </delete>
8657                         </actions>
8658                 </permacrud>
8659         </class>
8660
8661         <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">
8662                 <fields oils_persist:primary="id">
8663                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8664                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8665                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8666                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8667                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8668                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8669                 </fields>
8670                 <links>
8671                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8672                 </links>
8673         </class>
8674
8675         <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">
8676                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8677                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8678                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8679                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8680                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8681                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8682                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
8683                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
8684                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8685                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
8686                 </fields>
8687                 <links>
8688                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8689                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8690                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
8691                 </links>
8692                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8693                         <actions>
8694                                 <create permission="ADMIN_ACQ_FUND">
8695                     <context link="fund" field="org"/>
8696                 </create>
8697                                 <retrieve permission="ADMIN_ACQ_FUND">
8698                     <context link="fund" field="org"/>
8699                 </retrieve>
8700                                 <update permission="ADMIN_ACQ_FUND">
8701                     <context link="fund" field="org"/>
8702                 </update>
8703                                 <delete permission="ADMIN_ACQ_FUND">
8704                     <context link="fund" field="org"/>
8705                 </delete>
8706                         </actions>
8707                 </permacrud>
8708         </class>
8709
8710         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
8711                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8712                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8713                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8714                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8715                         <field reporter:label="Year" name="year" reporter:datatype="int" />
8716                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8717                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8718                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8719                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8720                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8721                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8722                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8723                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8724                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8725                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8726                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8727                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8728                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8729                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8730                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8731                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8732                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8733                 </fields>
8734                 <links>
8735                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8736                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8737             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8738             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8739             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8740             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8741             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8742             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8743             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8744             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8745             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8746                 </links>
8747         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8748             <actions>
8749                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8750                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8751                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8752                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8753             </actions>
8754         </permacrud>
8755         </class>
8756
8757         <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">
8758                 <fields oils_persist:primary="fund">
8759                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8760                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8761                 </fields>
8762                 <links>
8763                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8764                 </links>
8765         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8766             <actions>
8767                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8768                                         <context link="fund" field="org" />
8769                 </retrieve>
8770             </actions>
8771         </permacrud>
8772         </class>
8773
8774         <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">
8775                 <fields oils_persist:primary="fund">
8776                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8777                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8778                 </fields>
8779                 <links>
8780                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8781                 </links>
8782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8783             <actions>
8784                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8785                                         <context link="fund" field="org" />
8786                 </retrieve>
8787             </actions>
8788         </permacrud>
8789         </class>
8790
8791         <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">
8792                 <fields oils_persist:primary="fund">
8793                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8794                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8795                 </fields>
8796                 <links>
8797                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8798                 </links>
8799         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8800             <actions>
8801                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8802                                         <context link="fund" field="org" />
8803                 </retrieve>
8804             </actions>
8805         </permacrud>
8806         </class>
8807
8808         <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">
8809                 <fields oils_persist:primary="fund">
8810                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8811                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8812                 </fields>
8813                 <links>
8814                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8815                 </links>
8816         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8817             <actions>
8818                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8819                                         <context link="fund" field="org" />
8820                 </retrieve>
8821             </actions>
8822         </permacrud>
8823         </class>
8824
8825         <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">
8826                 <fields oils_persist:primary="fund">
8827                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8828                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8829                 </fields>
8830                 <links>
8831                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8832                 </links>
8833         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8834             <actions>
8835                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8836                                         <context link="fund" field="org" />
8837                 </retrieve>
8838             </actions>
8839         </permacrud>
8840         </class>
8841
8842    <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">
8843         <fields oils_persist:primary="fund">
8844             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8845             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8846         </fields>
8847         <links>
8848             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8849         </links>
8850     </class>
8851
8852    <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">
8853         <fields oils_persist:primary="fund">
8854             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8855             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8856         </fields>
8857         <links>
8858             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8859         </links>
8860     </class>
8861
8862    <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">
8863         <fields oils_persist:primary="fund">
8864             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8865             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8866         </fields>
8867         <links>
8868             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8869         </links>
8870     </class>
8871
8872    <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">
8873         <fields oils_persist:primary="fund">
8874             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8875             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8876         </fields>
8877         <links>
8878             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8879         </links>
8880     </class>
8881
8882    <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">
8883         <fields oils_persist:primary="fund">
8884             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8885             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8886         </fields>
8887         <links>
8888             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8889         </links>
8890     </class>
8891
8892         <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">
8893                 <fields oils_persist:primary="funding_source">
8894                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8895                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8896                 </fields>
8897                 <links>
8898                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8899                 </links>
8900         </class>
8901
8902         <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">
8903                 <fields oils_persist:primary="funding_source">
8904                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8905                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8906                 </fields>
8907                 <links>
8908                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8909                 </links>
8910         </class>
8911
8912         <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">
8913                 <fields oils_persist:primary="funding_source">
8914                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8915                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8916                 </fields>
8917                 <links>
8918                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8919                 </links>
8920         </class>
8921
8922         <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">
8923                 <fields oils_persist:primary="fund">
8924                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8925                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8926                 </fields>
8927                 <links>
8928                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8929                 </links>
8930         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8931             <actions>
8932                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8933                                         <context link="fund" field="org" />
8934                 </retrieve>
8935             </actions>
8936         </permacrud>
8937     </class>
8938     <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">
8939         <oils_persist:source_definition><![CDATA[
8940             SELECT
8941                 acqf.*,
8942                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8943                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8944                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8945                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8946             FROM
8947                 acq.fund acqf
8948                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8949                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8950                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8951                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8952         ]]></oils_persist:source_definition>
8953         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8954             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8955             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8956             <field reporter:label="Name" name="name" reporter:datatype="text" />
8957             <field reporter:label="Year" name="year" reporter:datatype="int" />
8958             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8959             <field reporter:label="Code" name="code" reporter:datatype="text" />
8960             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8961             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8962             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8963             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8964             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8965
8966             <!-- non fund-native fields -->
8967             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8968             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8969             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8970             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8971         </fields>
8972         <links>
8973             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8974             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8975             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8976         </links>
8977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8978             <actions>
8979                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8980             </actions>
8981         </permacrud>
8982         </class>
8983         <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">
8984                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8985                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8986                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8987                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8988                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8989                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8990                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8991                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8992                 </fields>
8993                 <links>
8994                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8995                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8996                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8997                 </links>
8998                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8999                         <actions>
9000                                 <create permission="ADMIN_ACQ_FUND">
9001                     <context link="fund" field="org"/>
9002                 </create>
9003                                 <retrieve permission="ADMIN_ACQ_FUND">
9004                     <context link="fund" field="org"/>
9005                 </retrieve>
9006                                 <update permission="ADMIN_ACQ_FUND">
9007                     <context link="fund" field="org"/>
9008                 </update>
9009                                 <delete permission="ADMIN_ACQ_FUND">
9010                     <context link="fund" field="org"/>
9011                 </delete>
9012                         </actions>
9013                 </permacrud>
9014         </class>
9015
9016     <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">
9017         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
9018             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9019             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9020             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9021             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
9022             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
9023             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9024             <field reporter:label="Note" name="note" reporter:datatype="text" />
9025             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9026         </fields>
9027         <links>
9028             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9029             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9030             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9031         </links>
9032                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9033                         <actions>
9034                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9035                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9036                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9037                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9038                         </actions>
9039                 </permacrud>
9040     </class>
9041
9042         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
9043                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
9044                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
9045                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9046                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
9047                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9048                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9049                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9050                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
9051                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
9052                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9053                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9054                 </fields>
9055                 <links>
9056                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9057                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9058                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9059                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9060                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
9061                 </links>
9062                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9063                         <actions>
9064                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
9065                         </actions>
9066                 </permacrud>
9067         </class>
9068
9069         <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">
9070                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
9071                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9072                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
9073                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9074                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
9075                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
9076                 </fields>
9077                 <links>
9078                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9079                 </links>
9080                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9081                         <actions>
9082                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9083                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
9084                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9085                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9086                         </actions>
9087                 </permacrud>
9088         </class>
9089
9090         <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">
9091                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
9092                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9093                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9094                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9095                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9096                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9097                         <field reporter:label="State" name="state" reporter:datatype="text" />
9098                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
9099                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9100                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9101                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
9102                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9103                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9104                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9105                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
9106                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
9107                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
9108                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
9109                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
9110                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
9111                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9112                 </fields>
9113                 <links>
9114                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9115                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9116                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9117                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
9118                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9119                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
9120                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
9121                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
9122                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9123                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9124                 </links>
9125                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9126                         <actions>
9127                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9128                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9129                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9130                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9131                         </actions>
9132                 </permacrud>
9133         </class>
9134
9135         <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">
9136                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
9137                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9138                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9139                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9140                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
9141                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9142                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9143                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9144                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9145                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9146                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9147                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9148                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9149                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
9150                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9151                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9152                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9153                 </fields>
9154                 <links>
9155                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
9156                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9157                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9158                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9159                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9160                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9161                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9162                 </links>
9163                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9164             <actions>
9165                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9166             </actions>
9167                 </permacrud>
9168         </class>
9169
9170         <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">
9171                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
9172                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9173                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9174                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9175                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9176                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9177                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9178                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
9179                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9180                 </fields>
9181                 <links>
9182                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9183                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9184                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9185                 </links>
9186                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9187             <actions>
9188                 <create permission="CREATE_PURCHASE_ORDER">
9189                     <context link="purchase_order" field="ordering_agency"/>
9190                 </create>
9191                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9192                     <context link="purchase_order" field="ordering_agency"/>
9193                 </retrieve>
9194                 <update permission="CREATE_PURCHASE_ORDER">
9195                     <context link="purchase_order" field="ordering_agency"/>
9196                 </update>
9197                 <delete permission="CREATE_PURCHASE_ORDER">
9198                     <context link="purchase_order" field="ordering_agency"/>
9199                 </delete>
9200             </actions>
9201                 </permacrud>
9202         </class>
9203
9204         <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">
9205                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
9206                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9207                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9208                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9209                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
9210                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
9211                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
9212                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9213                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
9214                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9215                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9216                 </fields>
9217                 <links>
9218                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9219                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9220                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9221                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9222                 </links>
9223                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9224             <actions>
9225                 <create permission="CREATE_PURCHASE_ORDER">
9226                     <context link="purchase_order" field="ordering_agency"/>
9227                 </create>
9228                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9229                     <context link="purchase_order" field="ordering_agency"/>
9230                 </retrieve>
9231                 <update permission="CREATE_PURCHASE_ORDER">
9232                     <context link="purchase_order" field="ordering_agency"/>
9233                 </update>
9234                 <delete permission="CREATE_PURCHASE_ORDER">
9235                     <context link="purchase_order" field="ordering_agency"/>
9236                 </delete>
9237             </actions>
9238                 </permacrud>
9239         </class>
9240
9241         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
9242                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
9243                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
9244                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
9245                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
9246                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9247                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9248                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9249                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9250                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
9251                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
9252                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
9253                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
9254                         <field reporter:label="State" name="state" reporter:datatype="text" />
9255                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9256                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9257                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
9258                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9259                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9260                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9261                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
9262                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9263                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9264                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
9265                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
9266                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
9267                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
9268                 </fields>
9269                 <links>
9270                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9271                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9272                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9273                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9274                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9275                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9276                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9277                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
9278                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
9279                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
9280                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9281                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
9282                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9283                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
9284                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
9285                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9286                 </links>
9287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9288                         <actions>
9289                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
9290                                         <context link="purchase_order" field="ordering_agency"/>
9291                                         <context link="picklist" field="org_unit"/>
9292                                 </retrieve>
9293                         </actions>
9294                 </permacrud>
9295         </class>
9296
9297         <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">
9298                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
9299                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9300                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9301                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9302                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
9303                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9304                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9305                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
9306                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9307                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9308                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
9309                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
9310                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9311                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9312                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
9313                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
9314                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
9315                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9316                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
9317                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9318                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9319                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9320                 </fields>
9321                 <links>
9322                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
9323                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9324                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9325                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9326                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9327                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9328                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9329                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9330                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9331                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9332                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9333                 </links>
9334                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9335                         <actions>
9336                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9337                                         <context link="purchase_order" field="ordering_agency"/>
9338                                         <context link="picklist" field="org_unit"/>
9339                                 </retrieve>
9340                         </actions>
9341                 </permacrud>
9342         </class>
9343
9344         <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">
9345                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
9346                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
9347                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9348                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9349                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9350                 </fields>
9351                 <links>
9352                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9353                 </links>
9354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9355                         <actions>
9356                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9357                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
9358                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9359                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9360                         </actions>
9361                 </permacrud>
9362         </class>
9363
9364         <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">
9365                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
9366                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
9367                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
9368                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9369                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9370                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9371                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9372                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9373                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
9374                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9375                 </fields>
9376                 <links>
9377                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9378                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9379                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9380                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
9381                 </links>
9382         </class>
9383
9384         <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">
9385                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
9386                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
9387                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
9388                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
9389                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
9390                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
9391                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
9392                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
9393                 </fields>
9394                 <links>
9395                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9396                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
9397                 </links>
9398         </class>
9399
9400         <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">
9401                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
9402                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
9403                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9404                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
9405                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
9406                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
9407                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
9408                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
9409                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9410                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
9411                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9412                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
9413                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
9414                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9415                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
9416                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9417                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
9418                 </fields>
9419                 <links>
9420                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9421                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
9422                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9423                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9424                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9425                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9426                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9427                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9428                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
9429                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
9430                 </links>
9431         </class>
9432
9433         <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">
9434                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9435                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9436                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9437                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9438                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9439                 </fields>
9440                 <links/>
9441                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9442                         <actions>
9443                                 <retrieve />
9444                         </actions>
9445                 </permacrud>
9446         </class>
9447
9448         <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">
9449                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9450                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9451                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9452                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9453                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9454                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9455             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9456                 </fields>
9457                 <links/>
9458         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9459             <actions>
9460                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9461                 <retrieve />
9462                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9463                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9464             </actions>
9465         </permacrud>
9466         </class>
9467
9468         <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">
9469                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9470                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9471                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9472                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9473                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9474                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9475                 </fields>
9476                 <links/>
9477         </class>
9478         <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">
9479                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9480                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9481                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9482                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9483                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9484                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9485                 </fields>
9486                 <links>
9487                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9488                 </links>
9489         </class>
9490
9491         <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">
9492             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9493                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9494                 <field reporter:label="Code" name="code" reporter:datatype="text" />
9495                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9496                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9497                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9498                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9499         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9500
9501             </fields>
9502             <links>
9503                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9504             </links>
9505             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9506                 <actions>
9507                     <create permission="ADMIN_PROVIDER">
9508                         <context link="provider" field="owner"/>
9509                     </create>
9510                     <retrieve permission="ADMIN_PROVIDER">
9511                         <context link="provider" field="owner"/>
9512                     </retrieve>
9513                     <update permission="ADMIN_PROVIDER">
9514                         <context link="provider" field="owner"/>
9515                     </update>
9516                     <delete permission="ADMIN_PROVIDER">
9517                         <context link="provider" field="owner"/>
9518                     </delete>
9519                 </actions>
9520             </permacrud>
9521         </class>
9522         
9523         <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">
9524             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
9525                 <field reporter:label="ID" name="id" reporter:datatype="id" />
9526                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9527                 <field reporter:label="Name" name="name" reporter:datatype="text" />
9528                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
9529             </fields>
9530             <links>
9531                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9532             </links>
9533             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9534                 <actions>
9535                     <create permission="ADMIN_PROVIDER">
9536                         <context link="provider" field="owner"/>
9537                     </create>
9538                     <retrieve permission="ADMIN_PROVIDER">
9539                         <context link="provider" field="owner"/>
9540                     </retrieve>
9541                     <update permission="ADMIN_PROVIDER">
9542                         <context link="provider" field="owner"/>
9543                     </update>
9544                     <delete permission="ADMIN_PROVIDER">
9545                         <context link="provider" field="owner"/>
9546                     </delete>
9547                 </actions>
9548             </permacrud>
9549         </class>
9550         
9551         <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">
9552             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9553                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9554                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9555                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9556                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9557                 </fields>
9558                 <links/>
9559         </class>
9560
9561         <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">
9562                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
9563                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
9564                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
9565                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
9566                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
9567                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
9568                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
9569                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
9570                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
9571                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
9572                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
9573                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
9574                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
9575                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
9576                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
9577                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes"/>
9578                 </fields>
9579                 <links>
9580                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9581                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9582                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9583                 </links>
9584         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9585             <actions>
9586                 <create permission="ADMIN_PROVIDER">
9587                     <context link="provider" field="owner"/>
9588                 </create>
9589                 <retrieve permission="ADMIN_PROVIDER">
9590                     <context link="provider" field="owner"/>
9591                 </retrieve>
9592                 <update permission="ADMIN_PROVIDER">
9593                     <context link="provider" field="owner"/>
9594                 </update>
9595                 <delete permission="ADMIN_PROVIDER">
9596                     <context link="provider" field="owner"/>
9597                 </delete>
9598             </actions>
9599         </permacrud>
9600         </class>
9601
9602         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
9603                 oils_obj:fieldmapper="acq::edi_attr" 
9604                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
9605                 <fields oils_persist:primary="key">
9606                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
9607                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9608                 </fields>
9609         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9610             <actions>
9611                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9612                 <retrieve/>
9613                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9614                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9615             </actions>
9616         </permacrud>
9617         </class>
9618         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
9619                 oils_obj:fieldmapper="acq::edi_attr_set" 
9620                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
9621                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
9622                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9623                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9624                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
9625                 </fields>
9626                 <links>
9627                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
9628                 </links>
9629         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9630             <actions>
9631                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9632                 <retrieve/>
9633                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9634                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9635             </actions>
9636         </permacrud>
9637         </class>
9638         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
9639                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
9640                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
9641                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
9642                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9643                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
9644                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
9645                 </fields>
9646                 <links>
9647                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9648                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
9649                 </links>
9650         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9651             <actions>
9652                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9653                 <retrieve/>
9654                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9655                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9656             </actions>
9657         </permacrud>
9658         </class>
9659
9660
9661         <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">
9662                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
9663                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
9664                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
9665                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
9666                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
9667                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
9668                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
9669                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
9670                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
9671                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
9672                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
9673                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
9674                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
9675                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
9676                 </fields>
9677                 <links>
9678                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
9679                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9680                 </links>
9681         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9682             <actions>
9683                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9684                     <context link="account" jump="provider" field="owner"/>
9685                 </retrieve>
9686                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9687                     <context link="account" jump="provider" field="owner"/>
9688                 </update>
9689                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9690                     <context link="account" jump="provider" field="owner"/>
9691                 </delete>
9692             </actions>
9693         </permacrud>
9694         </class>
9695
9696
9697         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
9698                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
9699                         <field name="id" reporter:datatype="id" />
9700                         <field name="parent" reporter:datatype="link"/>
9701                         <field name="owner" reporter:datatype="link"/>
9702                         <field name="create_time" reporter:datatype="timestamp"/>
9703                         <field name="name" reporter:datatype="text"/>
9704                         <field name="shared" reporter:datatype="bool"/>
9705                         <field name="share_with" reporter:datatype="link"/>
9706                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9707                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
9708                 </fields>
9709                 <links>
9710                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9711                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
9712                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
9713                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9714                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
9715                 </links>
9716         </class>
9717         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
9718                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
9719                         <field name="id" reporter:datatype="id" />
9720                         <field name="parent" reporter:datatype="link"/>
9721                         <field name="owner" reporter:datatype="link"/>
9722                         <field name="create_time" reporter:datatype="timestamp"/>
9723                         <field name="name" reporter:datatype="text"/>
9724                         <field name="shared" reporter:datatype="bool"/>
9725                         <field name="share_with" reporter:datatype="link"/>
9726                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9727                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
9728                 </fields>
9729                 <links>
9730                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9731                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
9732                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
9733                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9734                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
9735                 </links>
9736         </class>
9737         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
9738                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
9739                         <field name="id" reporter:datatype="id" />
9740                         <field name="parent" reporter:datatype="link"/>
9741                         <field name="owner" reporter:datatype="link"/>
9742                         <field name="create_time" reporter:datatype="timestamp"/>
9743                         <field name="name" reporter:datatype="text"/>
9744                         <field name="shared" reporter:datatype="bool"/>
9745                         <field name="share_with" reporter:datatype="link"/>
9746                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9747                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9748                 </fields>
9749                 <links>
9750                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9751                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
9752                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
9753                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9754                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
9755                 </links>
9756         </class>
9757         <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">
9758                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
9759                         <field name="id" reporter:datatype="id" />
9760                         <field name="owner" reporter:datatype="link"/>
9761                         <field name="create_time" reporter:datatype="timestamp"/>
9762                         <field name="name" reporter:datatype="text"/>
9763                         <field name="data" reporter:datatype="text"/>
9764                         <field name="folder" reporter:datatype="link"/>
9765                         <field name="description" reporter:datatype="text"/>
9766                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9767                 </fields>
9768                 <links>
9769                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9770                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
9771                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
9772                 </links>
9773         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9774             <actions>
9775                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9776                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9777                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9778                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9779             </actions>
9780         </permacrud>
9781         </class>
9782         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
9783                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
9784                         <field name="id" reporter:datatype="id" />
9785                         <field name="owner" reporter:datatype="link"/>
9786                         <field name="create_time" reporter:datatype="timestamp"/>
9787                         <field name="template" reporter:datatype="link"/>
9788                         <field name="data" reporter:datatype="text"/>
9789                         <field name="folder" reporter:datatype="link"/>
9790                         <field name="recur" reporter:datatype="bool"/>
9791                         <field name="recurrence" reporter:datatype="interval"/>
9792                         <field name="name" reporter:datatype="text"/>
9793                         <field name="description" reporter:datatype="text"/>
9794                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9795                 </fields>
9796                 <links>
9797                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9798                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
9799                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
9800                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
9801                 </links>
9802         </class>
9803         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
9804                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
9805                         <field name="id" reporter:datatype="id" />
9806                         <field name="runner" reporter:datatype="link"/>
9807                         <field name="start_time" reporter:datatype="timestamp"/>
9808                         <field name="complete_time" reporter:datatype="timestamp"/>
9809                         <field name="run_time" reporter:datatype="timestamp"/>
9810                         <field name="email" reporter:datatype="text"/>
9811                         <field name="excel_format" reporter:datatype="bool"/>
9812                         <field name="csv_format" reporter:datatype="bool"/>
9813                         <field name="html_format" reporter:datatype="bool"/>
9814                         <field name="error_code" reporter:datatype="int"/>
9815                         <field name="error_text" reporter:datatype="text"/>
9816                         <field name="report" reporter:datatype="link"/>
9817                         <field name="folder" reporter:datatype="link"/>
9818                         <field name="chart_pie" reporter:datatype="bool"/>
9819                         <field name="chart_bar" reporter:datatype="bool"/>
9820                         <field name="chart_line" reporter:datatype="bool"/>
9821                 </fields>
9822                 <links>
9823                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9824                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9825                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9826                 </links>
9827         </class>
9828         <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">
9829                 <fields oils_persist:primary="id">
9830                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9831                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9832                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9833                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9834                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9835                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9836                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9837                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9838                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9839                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9840                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9841                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9842                 </fields>
9843                 <links>
9844                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9845                 </links>
9846                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9847                         <actions>
9848                                 <retrieve />
9849                         </actions>
9850                 </permacrud>
9851         </class>
9852         <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">
9853                 <fields oils_persist:primary="id">
9854                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9855                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9856                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9857                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9858                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9859                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9860                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9861                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9862                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9863                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9864                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9865                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9866                 </fields>
9867                 <links>
9868                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9869                 </links>
9870         </class>
9871         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9872                 <fields oils_persist:primary="id">
9873                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9874                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9875                         <field reporter:label="Fingerprint" name="fingerprint" />
9876                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9877                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9878                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9879                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9880                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9881                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9882                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9883                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9884                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9885                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9886                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9887                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9888                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9889                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9890                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9891                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9892                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9893                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9894                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9895                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9896                 </fields>
9897                 <links>
9898                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9899                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9900                 </links>
9901         </class>
9902         <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">
9903                 <fields oils_persist:primary="id">
9904                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9905                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9906                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9907                 </fields>
9908                 <links>
9909                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9910                 </links>
9911         </class>
9912         <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">
9913                 <fields oils_persist:primary="id">
9914                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9915                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9916                 </fields>
9917                 <links>
9918                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9919                 </links>
9920         </class>
9921         <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">
9922                 <fields oils_persist:primary="id">
9923                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9924                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9925                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9926                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9927                 </fields>
9928                 <links>
9929                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9930                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9931                 </links>
9932         </class>
9933         <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">
9934                 <fields oils_persist:primary="xact">
9935                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9936                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9937                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9938                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9939                 </fields>
9940                 <links>
9941                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9942                 </links>
9943         </class>
9944         <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">
9945                 <fields oils_persist:primary="xact">
9946                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9947                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9948                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9949                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9950                 </fields>
9951                 <links>
9952                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9953                 </links>
9954         </class>
9955         <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)">
9956                 <fields oils_persist:primary="id">
9957                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9958                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9959                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9960                 </fields>
9961                 <links>
9962                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9963                 </links>
9964         </class>
9965         <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">
9966                 <fields oils_persist:primary="id">
9967                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9968                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9969                 </fields>
9970                 <links>
9971                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9972                 </links>
9973         </class>
9974         <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">
9975                 <fields oils_persist:primary="bibid">
9976                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
9977                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
9978                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
9979                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
9980                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
9981                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
9982                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
9983                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
9984                 </fields>
9985                 <links>
9986                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
9987                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9988                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9989                 </links>
9990         </class>
9991         <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">
9992                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9993                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9994                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9995                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9996                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9997                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9998                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9999                 </fields>
10000                 <links>
10001                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10002                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
10003                 </links>
10004                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10005                         <actions>
10006                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10007                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10008                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10009                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10010                         </actions>
10011                 </permacrud>
10012         </class>
10013         <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">
10014                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
10015                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
10016                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
10017                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
10018                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10019                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10020                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
10021                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10022                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
10023                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
10024                 </fields>
10025                 <links>
10026                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10027                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10028                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10029                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10030                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10031                 </links>
10032                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10033                         <actions>
10034                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
10035                                         <context link="formula" field="owner"/>
10036                                 </create>
10037                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
10038                                         <context link="formula" field="owner"/>
10039                                 </retrieve>
10040                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
10041                                         <context link="formula" field="owner"/>
10042                                 </update>
10043                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
10044                                         <context link="formula" field="owner"/>
10045                                 </delete>
10046                         </actions>
10047                 </permacrud>
10048         </class>
10049
10050         <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">
10051                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
10052                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10053                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10054                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10055                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
10056                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10057                 </fields>
10058                 <links>
10059                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10060                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10061                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10062                 </links>
10063                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10064                         <actions>
10065                                 <create permission="CREATE_PURCHASE_ORDER">
10066                                         <context link="formula" field="owner"/>
10067                 </create>
10068                                 <retrieve permission="CREATE_PURCHASE_ORDER">
10069                                         <context link="formula" field="owner"/>
10070                 </retrieve>
10071                                 <update permission="CREATE_PURCHASE_ORDER">
10072                                         <context link="formula" field="owner"/>
10073                 </update>
10074                                 <delete permission="CREATE_PURCHASE_ORDER">
10075                                         <context link="formula" field="owner"/>
10076                 </delete>
10077                         </actions>
10078                 </permacrud>
10079         </class>
10080
10081         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
10082                 <fields oils_persist:primary="id">
10083                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
10084                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10085                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
10086                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
10087                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
10088                 </fields>
10089                 <links>
10090                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10091                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
10092                 </links>
10093         </class>
10094
10095         <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">
10096                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
10097                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10098                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10099                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10100                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10101                 </fields>
10102                 <links>
10103                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10104                 </links>
10105                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10106                         <actions>
10107                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10108                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10109                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10110                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10111                         </actions>
10112                 </permacrud>
10113         </class>
10114
10115         <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">
10116                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
10117                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10118                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10119                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10120                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10121                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
10122                 </fields>
10123                 <links>
10124                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10125                 </links>
10126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10127                         <actions>
10128                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10129                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10130                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10131                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10132                         </actions>
10133                 </permacrud>
10134         </class>
10135
10136         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
10137                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
10138                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10139                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10140                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10141                 </fields>
10142                 <links>
10143                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10144                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10145                 </links>
10146         </class>
10147
10148         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
10149                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
10150                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10151                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10152                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10153                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10154                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10155                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10156                 </fields>
10157                 <links>
10158                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10159                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
10160                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10161                 </links>
10162         </class>
10163
10164         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
10165                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
10166                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10167                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10168                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
10169                 </fields>
10170                 <links>
10171                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10172                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
10173                 </links>
10174         </class>
10175
10176         <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">
10177                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
10178                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10179                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10180                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10181                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10182                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10183                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10184                 </fields>
10185                 <links>
10186                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10187                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
10188                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10189                 </links>
10190         </class>
10191
10192         <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">
10193                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
10194                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
10195                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10196                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
10197                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10198                 </fields>
10199                 <links>
10200                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10201                 </links>
10202                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10203             <actions>
10204                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10205                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
10206                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10207                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10208             </actions>
10209                 </permacrud>
10210         </class>
10211
10212         <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">
10213                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
10214                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
10215                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
10216                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
10217                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
10218                 </fields>
10219                 <links>
10220                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10221                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
10222                 </links>
10223                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10224                         <actions>
10225                                 <create permission="ADMIN_CLAIM_POLICY">
10226                                         <context link="claim_policy" field="org_unit"/>
10227                 </create>
10228                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
10229                                         <context link="claim_policy" field="org_unit"/>
10230                 </retrieve>
10231                                 <update permission="ADMIN_CLAIM_POLICY">
10232                                         <context link="claim_policy" field="org_unit"/>
10233                 </update>
10234                                 <delete permission="ADMIN_CLAIM_POLICY">
10235                                         <context link="claim_policy" field="org_unit"/>
10236                 </delete>
10237                         </actions>
10238                 </permacrud>
10239         </class>
10240
10241     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
10242         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
10243             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10244             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
10245             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10246             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
10247             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
10248             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
10249             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
10250             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
10251             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
10252             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
10253             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
10254             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
10255             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
10256             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
10257             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10258             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
10259         </fields>
10260         <links>
10261             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
10262         </links>
10263     </class>
10264
10265     <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">
10266         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
10267             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10268             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10269             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10270             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10271             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10272         </fields>
10273     </class>
10274
10275     <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">
10276         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10277             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10278             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10279             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10280             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10281             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10282             <field reporter:label="City" name="city" reporter:datatype="text"/>
10283             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10284             <field reporter:label="State" name="state" reporter:datatype="text"/>
10285             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10286             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10287             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10288         </fields>
10289     </class>
10290
10291     <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">
10292         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10293             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10294             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10295             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10296             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10297             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10298             <field reporter:label="City" name="city" reporter:datatype="text"/>
10299             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10300             <field reporter:label="State" name="state" reporter:datatype="text"/>
10301             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10302             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10303             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10304         </fields>
10305     </class>
10306
10307     <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">
10308         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
10309             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10310             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10311             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10312             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
10313             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
10314             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10315         </fields>
10316     </class>
10317
10318     <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">
10319         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
10320             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10321             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10322             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10323             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
10324             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
10325             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10326         </fields>
10327     </class>
10328
10329         <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">
10330                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
10331                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
10332                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10333                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
10334                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
10335                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
10336                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
10337                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
10338                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
10339                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10340                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10341                 </fields>
10342                 <links>
10343                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10344                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10345                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
10346                 </links>
10347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10348                         <actions>
10349                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10350                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10351                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10352                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10353                         </actions>
10354                 </permacrud>
10355         </class>
10356
10357         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
10358                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
10359                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
10360                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10361                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10362                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
10363                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
10364                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
10365                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
10366                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
10367                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
10368                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
10369                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
10370                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
10371                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
10372                 </fields>
10373                 <links>
10374                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10375                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10376                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10377                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
10378                 </links>
10379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10380                         <actions>
10381                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10382                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10383                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10384                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10385                         </actions>
10386                 </permacrud>
10387         </class>
10388
10389         <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">
10390                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
10391                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
10392                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
10393                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
10394                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
10395                 </fields>
10396                 <links>
10397                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
10398                 </links>
10399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
10400                         <actions>
10401                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10402                     <context link="fieldset" field="owning_lib"/>
10403                 </create>
10404                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10405                     <context link="fieldset" field="owning_lib"/>
10406                 </retrieve>
10407                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10408                     <context link="fieldset" field="owning_lib"/>
10409                 </update>
10410                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10411                     <context link="fieldset" field="owning_lib"/>
10412                 </delete>
10413                         </actions>
10414                 </permacrud>
10415         </class>
10416
10417     <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">
10418         <fields>
10419             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10420             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10421             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10422         </fields>
10423                 <links>
10424                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10425                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10426                 </links>
10427     </class>
10428
10429     <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">
10430         <fields>
10431             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10432             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
10433         </fields>
10434                 <links>
10435                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10436                 </links>
10437     </class>
10438
10439     <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">
10440         <fields>
10441             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10442             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10443             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10444         </fields>
10445                 <links>
10446                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10447                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10448                 </links>
10449     </class>
10450
10451     <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">
10452         <fields>
10453             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10454             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
10455         </fields>
10456                 <links>
10457                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10458                 </links>
10459     </class>
10460
10461     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
10462                 <oils_persist:source_definition><![CDATA[
10463
10464             SELECT  DISTINCT l.*
10465               FROM  action.unfulfilled_hold_loops l
10466                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
10467               WHERE l.count = m.max
10468
10469                 ]]></oils_persist:source_definition>
10470         <fields>
10471             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10472             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10473             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10474         </fields>
10475                 <links>
10476                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10477                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10478                 </links>
10479     </class>
10480
10481         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
10482                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
10483                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
10484                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
10485                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
10486                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
10487                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
10488                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
10489                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
10490                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
10491                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
10492                 </fields>
10493                 <links>
10494                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
10495                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
10496                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
10497                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
10498                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
10499                 </links>
10500         </class>
10501
10502         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
10503                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
10504                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
10505                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
10506                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10507                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
10508                 </fields>
10509                 <links>
10510                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
10511                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
10512                 </links>
10513         </class>
10514
10515         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
10516                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
10517                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
10518                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
10519                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
10520                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
10521                 </fields>
10522                 <links>
10523                 </links>
10524         </class>
10525
10526         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
10527                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
10528                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
10529                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
10530                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10531                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
10532                 </fields>
10533                 <links>
10534                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
10535                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
10536                 </links>
10537         </class>
10538         
10539         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
10540                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
10541                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
10542                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
10543                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
10544                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
10545                 </fields>
10546                 <links>
10547                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
10548                 </links>
10549         </class>
10550         
10551         <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">
10552                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
10553                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
10554                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10555                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10556                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
10557                 </fields>
10558                 <links>
10559                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10560                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
10561                 </links>
10562         </class>
10563
10564         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
10565                 <fields oils_persist:primary="name">
10566                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
10567                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
10568                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
10569                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10570                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
10571                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
10572                 </fields>
10573                 <links>
10574                 </links>
10575         </class>
10576
10577         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
10578                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10579                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10580                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
10581                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10582                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10583                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10584                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10585                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10586                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10587                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10588                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10589                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10590                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10591                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10592                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10593                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10594                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10595                 </fields>
10596                 <links>
10597                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10598                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10599                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10600                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10601                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10602                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10603                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10604                 </links>
10605         </class>
10606
10607         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
10608                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
10609                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
10610                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10611                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10612                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
10613                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
10614                 </fields>
10615                 <links>
10616                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10617                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
10618                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
10619                 </links>
10620         </class>
10621
10622         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
10623                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
10624                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
10625                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
10626                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
10627                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
10628                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
10629                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
10630                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10631                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
10632                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10633                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
10634                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
10635                 </fields>
10636                 <links>
10637                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10638                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
10639                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
10640                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
10641                 </links>
10642         </class>
10643
10644         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
10645                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
10646                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
10647                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
10648                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10649                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10650                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
10651                 </fields>
10652                 <links>
10653                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
10654                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
10655                 </links>
10656         </class>
10657
10658         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
10659                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
10660                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
10661                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10662                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10663                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10664                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
10665                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
10666                 </fields>
10667                 <links>
10668                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10669                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10670                 </links>
10671         </class>
10672
10673         <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">
10674                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
10675                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
10676                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10677                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10678                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10679                 </fields>
10680                 <links>
10681                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10682                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10683                 </links>
10684         </class>
10685
10686         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
10687                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10688                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10689                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10690                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10691                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10692                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10693                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10694                 </fields>
10695                 <links>
10696                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10697                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10698                 </links>
10699         </class>
10700
10701         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
10702                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10703                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10704                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10705                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10706                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10707                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10708                 </fields>
10709                 <links>
10710                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10711                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10712                 </links>
10713         </class>
10714
10715         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
10716                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10717                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10718                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10719                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10720                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10721                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10722                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10723                 </fields>
10724                 <links>
10725                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10726                 </links>
10727         </class>
10728
10729         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
10730                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10731                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10732                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10733                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10734                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10735                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10736                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10737                 </fields>
10738                 <links>
10739                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10740                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10741                 </links>
10742         </class>
10743
10744         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
10745                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10746                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10747                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10748                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10749                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10750                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10751                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10752                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10753                 </fields>
10754                 <links>
10755                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10756                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10757                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10758                 </links>
10759         </class>
10760
10761         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
10762                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10763                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10764                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10765                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10766                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10767                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10768                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10769                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10770                 </fields>
10771                 <links>
10772                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10773                 </links>
10774         </class>
10775
10776         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
10777                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10778                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10779                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10780                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10781                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10782                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10783                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10784                 </fields>
10785                 <links>
10786                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10787                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10788                 </links>
10789         </class>
10790
10791         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
10792                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10793                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10794                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10795                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10796                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10797                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10798                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10799                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10800                 </fields>
10801                 <links>
10802                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10803                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10804                 </links>
10805         </class>
10806
10807         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
10808                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10809                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10810                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10811                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10812                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10813                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10814                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10815                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10816                 </fields>
10817                 <links>
10818                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10819                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10820                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10821                 </links>
10822         </class>
10823
10824         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
10825                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10826                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10827                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10828                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10829                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10830                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10831                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10832                 </fields>
10833                 <links>
10834                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10835                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10836                 </links>
10837         </class>
10838
10839         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
10840                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10841                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10842                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10843                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10844                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10845                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10846                 </fields>
10847                 <links>
10848                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10849                 </links>
10850         </class>
10851
10852         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
10853                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10854                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10855                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10856                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10857                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10858                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10859                 </fields>
10860                 <links>
10861                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10862                 </links>
10863         </class>
10864
10865         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
10866                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10867                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10868                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10869                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10870                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10871                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10872                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10873                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10874                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10875                 </fields>
10876                 <links>
10877                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10878                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10879                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10880                 </links>
10881         </class>
10882
10883         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
10884                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10885                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10886                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10887                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10888                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10889                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10890                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10891                 </fields>
10892                 <links>
10893                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10894                 </links>
10895         </class>
10896
10897         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
10898                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10899                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10900                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10901                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10902                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10903                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10904                 </fields>
10905                 <links>
10906                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10907                 </links>
10908         </class>
10909
10910         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10911                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10912                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10913                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
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="Subquery" name="subquery" reporter:datatype="link"/>
10917                 </fields>
10918                 <links>
10919                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10920                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10921                 </links>
10922         </class>
10923
10924         <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">
10925                 <fields oils_persist:primary="id">
10926                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10927                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10928                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10929                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10930                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10931                 </fields>
10932                 <links>
10933                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10934                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10935                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10936                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10937                 </links>
10938         </class>
10939
10940         <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">
10941                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10942                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10943                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10944                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10945                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10946                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10947                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10948                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10949                 </fields>
10950                 <links/>
10951                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10952                         <actions>
10953                                 <retrieve/>
10954                         </actions>
10955                 </permacrud>
10956         </class>
10957
10958         <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">
10959                 <fields oils_persist:primary="ptype_key">
10960                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10961                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10962                 </fields>
10963                 <links/>
10964                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10965                         <actions>
10966                                 <retrieve/>
10967                         </actions>
10968                 </permacrud>
10969         </class>
10970
10971         <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">
10972                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10973                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10974                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10975                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10976                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10977                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10978                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10979                 </fields>
10980                 <links>
10981                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10982                 </links>
10983                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10984                         <actions>
10985                                 <retrieve/>
10986                         </actions>
10987                 </permacrud>
10988         </class>
10989
10990         <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">
10991                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10992                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10993                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10994                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10995                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10996                 </fields>
10997                 <links>
10998                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10999                 </links>
11000                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11001                         <actions>
11002                                 <retrieve/>
11003                         </actions>
11004                 </permacrud>
11005         </class>
11006
11007     <class
11008         id="uvs"
11009         controller="open-ils.cstore open-ils.pcrud"
11010         oils_obj:fieldmapper="url_verify::session"
11011         oils_persist:tablename="url_verify.session"
11012         reporter:label="URL Verification Session"
11013     >
11014         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
11015             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
11016             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11017                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
11018             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
11019             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
11020             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11021             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
11022             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
11023             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
11024         </fields>
11025
11026         <links>
11027             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11028             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11029             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
11030             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
11031             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
11032         </links>
11033
11034         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11035             <actions>
11036                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
11037             </actions>
11038         </permacrud>
11039
11040     </class>
11041
11042     <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">
11043         <oils_persist:source_definition><![CDATA[
11044             SELECT
11045                 cbrebi.id AS id,  -- so we can have a pkey in our view
11046                 uvs.id AS session,
11047                 uvs.owning_lib,
11048                 cbrebi.target_biblio_record_entry
11049             FROM url_verify.session uvs
11050             JOIN container.biblio_record_entry_bucket cbreb
11051                 ON (uvs.container = cbreb.id)
11052             JOIN container.biblio_record_entry_bucket_item cbrebi
11053                 ON (cbrebi.bucket = cbreb.id)
11054         ]]></oils_persist:source_definition>
11055         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
11056             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
11057             <field reporter:label="Session" name="session" reporter:datatype="link" />
11058             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
11059             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
11060         </fields>
11061         <links>
11062             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
11063             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
11064             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
11065         </links>
11066         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11067             <actions>
11068                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
11069             </actions>
11070         </permacrud>
11071     </class>
11072
11073     <class
11074         id="uvus"
11075         controller="open-ils.cstore open-ils.pcrud"
11076         oils_obj:fieldmapper="url_verify::url_selector"
11077         oils_persist:tablename="url_verify.url_selector"
11078         reporter:label="URL Verification URL Selector"
11079     >
11080         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
11081             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
11082             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
11083                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11084             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
11085         </fields>
11086
11087         <links>
11088             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11089             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
11090         </links>
11091
11092         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11093             <actions>
11094                 <create permission="URL_VERIFY">
11095                     <context link="session" field="owning_lib"/>
11096                 </create>
11097                 <retrieve permission="URL_VERIFY">
11098                     <context link="session" field="owning_lib"/>
11099                 </retrieve>
11100                 <update permission="URL_VERIFY">
11101                     <context link="session" field="owning_lib"/>
11102                 </update>
11103                 <delete permission="URL_VERIFY">
11104                     <context link="session" field="owning_lib"/>
11105                 </delete>
11106             </actions>
11107         </permacrud>
11108
11109     </class>
11110
11111     <class
11112         id="uvu"
11113         controller="open-ils.cstore open-ils.pcrud"
11114         oils_obj:fieldmapper="url_verify::url"
11115         oils_persist:tablename="url_verify.url"
11116         reporter:label="URL Verification URL"
11117     >
11118         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
11119             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
11120                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
11121                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
11122                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11123                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
11124             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11125             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11126             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
11127             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
11128             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
11129             <field reporter:label="Host" name="host" reporter:datatype="text"/>
11130             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
11131             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
11132             <field reporter:label="Path" name="path" reporter:datatype="text"/>
11133             <field reporter:label="Page" name="page" reporter:datatype="text"/>
11134             <field reporter:label="Query" name="query" reporter:datatype="text"/>
11135             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
11136             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
11137         </fields>
11138
11139         <links>
11140             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
11141             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
11142             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11143             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
11144             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
11145         </links>
11146
11147         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11148             <actions>
11149                 <create permission="URL_VERIFY">
11150                     <context link="session" field="owning_lib"/>
11151                 </create>
11152                 <retrieve permission="URL_VERIFY">
11153                     <context link="session" field="owning_lib"/>
11154                 </retrieve>
11155                 <update permission="URL_VERIFY">
11156                     <context link="session" field="owning_lib"/>
11157                 </update>
11158                 <delete permission="URL_VERIFY">
11159                     <context link="session" field="owning_lib"/>
11160                 </delete>
11161             </actions>
11162         </permacrud>
11163
11164     </class>
11165
11166     <class
11167         id="uvva"
11168         controller="open-ils.cstore open-ils.pcrud"
11169         oils_obj:fieldmapper="url_verify::verification_attempt"
11170         oils_persist:tablename="url_verify.verification_attempt"
11171         reporter:label="URL Verification Attempt"
11172     >
11173         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
11174             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
11175                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
11176                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
11177             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
11178             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
11179         </fields>
11180
11181         <links>
11182             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11183             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11184         </links>
11185
11186         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11187             <actions>
11188                 <create permission="URL_VERIFY">
11189                     <context link="session" field="owning_lib"/>
11190                 </create>
11191                 <retrieve permission="URL_VERIFY">
11192                     <context link="session" field="owning_lib"/>
11193                 </retrieve>
11194                 <update permission="URL_VERIFY">
11195                     <context link="session" field="owning_lib"/>
11196                 </update>
11197                 <delete permission="URL_VERIFY">
11198                     <context link="session" field="owning_lib"/>
11199                 </delete>
11200             </actions>
11201         </permacrud>
11202
11203     </class>
11204
11205     <class
11206         id="uvuv"
11207         controller="open-ils.cstore open-ils.pcrud"
11208         oils_obj:fieldmapper="url_verify::url_verification"
11209         oils_persist:tablename="url_verify.url_verification"
11210         reporter:label="URL Verification"
11211     >
11212         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
11213             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
11214                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
11215                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
11216             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
11217             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
11218             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
11219             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
11220                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
11221         </fields>
11222
11223         <links>
11224             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
11225             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
11226             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
11227         </links>
11228
11229         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11230             <actions>
11231                 <create permission="URL_VERIFY">
11232                     <context link="attempt" jump="session" field="owning_lib"/>
11233                 </create>
11234                 <retrieve permission="URL_VERIFY">
11235                     <context link="attempt" jump="session" field="owning_lib"/>
11236                 </retrieve>
11237                 <update permission="URL_VERIFY">
11238                     <context link="attempt" jump="session" field="owning_lib"/>
11239                 </update>
11240                 <delete permission="URL_VERIFY">
11241                     <context link="attempt" jump="session" field="owning_lib"/>
11242                 </delete>
11243             </actions>
11244         </permacrud>
11245
11246     </class>
11247
11248         <class
11249                 id="cfdi"
11250                 controller="open-ils.cstore open-ils.pcrud"
11251                 oils_obj:fieldmapper="config::filter_dialog_interface"
11252                 oils_persist:tablename="config.filter_dialog_interface"
11253                 reporter:label="FilterDialog Interface">
11254                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
11255                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
11256                         <field reporter:label="Description" name="description" reporter:datatype="text" />
11257                 </fields>
11258                 <links>
11259                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
11260                 </links>
11261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11262                         <actions>
11263                                 <retrieve />
11264                         </actions>
11265                 </permacrud>
11266         </class>
11267
11268         <class
11269                 id="cfdfs"
11270                 controller="open-ils.cstore open-ils.pcrud"
11271                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
11272                 oils_persist:tablename="config.filter_dialog_filter_set"
11273                 reporter:label="FilterDialog Filter Set">
11274                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
11275                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11276                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11277                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11278                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11279                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
11280                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11281                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
11282                 </fields>
11283                 <links>
11284                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11285                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11286                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
11287                 </links>
11288                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11289                         <actions>
11290                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11291                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11292                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11293                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11294                         </actions>
11295                 </permacrud>
11296
11297         </class>
11298
11299         <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">
11300                 <fields oils_persist:primary="code">
11301                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
11302                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
11303                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
11304                 </fields>
11305                 <links/>
11306                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11307                         <actions>
11308                                 <retrieve/>
11309                         </actions>
11310                 </permacrud>
11311         </class>
11312
11313         <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">
11314                 <oils_persist:source_definition><![CDATA[
11315
11316             SELECT  b.id,
11317                     MAX(dcp.edit_date) AS last_delete_date
11318              FROM   biblio.record_entry b
11319                     JOIN asset.call_number cn ON (cn.record = b.id)
11320                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
11321              WHERE  NOT b.deleted
11322              GROUP BY b.id
11323              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
11324
11325                 ]]></oils_persist:source_definition>
11326                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11327                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11328                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
11329                 </fields>
11330                 <links>
11331                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11332                 </links>
11333                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11334                         <actions>
11335                                 <retrieve/>
11336                         </actions>
11337                 </permacrud>
11338         </class>
11339
11340         <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">
11341                 <oils_persist:source_definition><![CDATA[
11342
11343             -- -- 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.
11344             -- -- 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
11345             -- -- may not.
11346             -- SELECT
11347             --     bre.id AS bib_id,
11348             --     COALESCE( z.copy_count, 0 ) AS copy_count,
11349             --     COALESCE( z.hold_count, 0 ) AS hold_count,
11350             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
11351             -- FROM (
11352                 SELECT
11353                     y.bre AS id,
11354                     COALESCE( x.copy_count, 0 ) AS copy_count,
11355                     y.hold_count AS hold_count,
11356                     (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
11357                 FROM (
11358                         SELECT
11359                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
11360                             COUNT(*) AS hold_count
11361                         FROM action.hold_request h
11362                         WHERE
11363                             cancel_time IS NULL
11364                             AND fulfillment_time IS NULL
11365                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
11366                         GROUP BY 1
11367                     )y LEFT JOIN (
11368                         SELECT 
11369                             (SELECT id
11370                                 FROM biblio.record_entry 
11371                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
11372                             ) AS bre, 
11373                             COUNT(*) AS copy_count
11374                         FROM asset.copy
11375                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
11376                         WHERE copy.holdable 
11377                             AND NOT copy.deleted 
11378                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
11379                         GROUP BY 1
11380                     )x ON x.bre = y.bre
11381                 -- )z RIGHT JOIN (
11382                 --     SELECT id
11383                 --     FROM biblio.record_entry
11384                 --     WHERE NOT deleted
11385                 -- )bre ON (z.bib_id = bre.id)
11386                 
11387
11388                 ]]></oils_persist:source_definition>
11389                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11390                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11391                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
11392                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
11393                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
11394                 </fields>
11395                 <links>
11396                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11397                 </links>
11398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11399                         <actions>
11400                                 <retrieve/>
11401                         </actions>
11402                 </permacrud>
11403         </class>
11404
11405         <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">
11406                 <oils_persist:source_definition><![CDATA[
11407             SELECT *,
11408                 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,
11409                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
11410             FROM
11411                 (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
11412                     FROM
11413                         action.hold_request ahr
11414                         JOIN reporter.hold_request_record rhrr USING (id)
11415                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11416                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
11417                     WHERE
11418                         ahr.cancel_time IS NULL
11419                         AND ahr.fulfillment_time IS NULL
11420                     GROUP BY bib_record, pickup_lib
11421                 )x
11422                 JOIN
11423                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11424                     FROM
11425                         action.hold_request ahr
11426                         JOIN reporter.hold_request_record rhrr USING (id)
11427                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11428                     WHERE
11429                         ahr.cancel_time IS NULL
11430                         AND ahr.fulfillment_time IS NULL
11431                     GROUP BY bib_record
11432                 )y
11433                 USING (id)
11434                 ]]></oils_persist:source_definition>
11435                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11436                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11437                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
11438                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
11439                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
11440                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11441                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11442                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
11443                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11444                 </fields>
11445                 <links>
11446                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11447                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
11448                 </links>
11449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11450                         <actions>
11451                                 <retrieve/>
11452                         </actions>
11453                 </permacrud>
11454         </class>
11455
11456         <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) ">
11457                 <oils_persist:source_definition><![CDATA[
11458             WITH counts_at_ou AS (
11459                 SELECT  rhrr.bib_record AS id,
11460                         aou.id AS pickup_lib_or_desc,
11461                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
11462                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
11463                   FROM  actor.org_unit aou
11464                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
11465                         action.hold_request ahr
11466                         JOIN reporter.hold_request_record rhrr USING (id)
11467                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11468                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
11469                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
11470                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
11471                         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
11472                   GROUP BY 1, 2
11473             )
11474             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
11475                    y.holds_everywhere, y.copy_count_everywhere,
11476                 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,
11477                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
11478             FROM counts_at_ou x
11479                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11480                     FROM
11481                         action.hold_request ahr
11482                         JOIN reporter.hold_request_record rhrr USING (id)
11483                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11484                     WHERE
11485                         ahr.cancel_time IS NULL
11486                         AND ahr.fulfillment_time IS NULL
11487                     GROUP BY bib_record
11488                 )y
11489                 USING (id)
11490                 ]]></oils_persist:source_definition>
11491                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11492                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11493                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
11494                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
11495                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
11496                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11497                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11498                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
11499                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11500                 </fields>
11501                 <links>
11502                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11503                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
11504                 </links>
11505                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11506                         <actions>
11507                                 <retrieve/>
11508                         </actions>
11509                 </permacrud>
11510         </class>
11511
11512         <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">
11513                 <oils_persist:source_definition><![CDATA[
11514             SELECT
11515                 ac.id,
11516                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
11517                 MAX(actac.xact_start) AS last_circ
11518             FROM asset.copy ac
11519                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11520             GROUP BY ac.id
11521
11522             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
11523             --SELECT
11524             --    ac.id,
11525             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
11526             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
11527             --FROM asset.copy ac
11528             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11529             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
11530             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
11531                 ]]></oils_persist:source_definition>
11532                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11533                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
11534                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
11535                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
11536                 </fields>
11537                 <links>
11538                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11539                 </links>
11540                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11541                         <actions>
11542                                 <retrieve/>
11543                         </actions>
11544                 </permacrud>
11545         </class>
11546
11547         <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">
11548                 <fields oils_persist:primary="id">
11549                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
11550                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
11551                 </fields>
11552                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11553                         <actions>
11554                                 <retrieve/>
11555                         </actions>
11556                 </permacrud>
11557         </class>
11558
11559         <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">
11560                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
11561                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11562                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
11563                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11564                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11565                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11566                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11567                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11568                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
11569                 </fields>
11570                 <links>
11571                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
11572                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11573                 </links>
11574                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11575                         <actions>
11576                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11577                                 <retrieve/>
11578                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11579                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11580                         </actions>
11581                 </permacrud>
11582         </class>
11583
11584         <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">
11585                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
11586                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11587                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
11588                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11589                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11590                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11591                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11592                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11593                 </fields>
11594                 <links>
11595                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
11596                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11597                 </links>
11598                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11599                         <actions>
11600                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11601                                 <retrieve/>
11602                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11603                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11604                         </actions>
11605                 </permacrud>
11606         </class>
11607
11608
11609         <!-- ********************************************************************************************************************* -->
11610         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
11611         <!-- ********************************************************************************************************************* -->
11612         <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">
11613                 <fields oils_persist:primary="id">
11614                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
11615                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
11616                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
11617                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11618                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
11619                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
11620                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11621                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
11622                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
11623                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
11624                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
11625                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
11626                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
11627                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
11628                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11629                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
11630                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
11631                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
11632                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
11633                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
11634                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
11635                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
11636                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
11637                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
11638                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
11639                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
11640                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
11641                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
11642                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
11643                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11644                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11645                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11646                 </fields>
11647                 <links>
11648                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11649                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
11650                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
11651                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
11652                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
11653                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
11654                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
11655                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
11656                 </links>
11657         </class>
11658
11659         <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">
11660                 <fields oils_persist:primary="id">
11661                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11662                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11663                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11664                 </fields>
11665                 <links>
11666                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11667                 </links>
11668         </class>
11669
11670         <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">
11671                 <fields oils_persist:primary="id">
11672                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11673                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11674                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11675                 </fields>
11676                 <links>
11677                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11678                 </links>
11679         </class>
11680
11681         <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">
11682                 <fields oils_persist:primary="id">
11683                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
11684
11685                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
11686                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
11687                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
11688
11689                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
11690                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
11691                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
11692
11693                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
11694                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
11695
11696                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11697                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
11698                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
11699
11700                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
11701                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
11702
11703                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
11704                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
11705                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
11706
11707                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
11708                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
11709                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
11710
11711                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11712                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
11713                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
11714                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
11715
11716                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
11717                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
11718
11719                 </fields>
11720                 <links>
11721                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
11722                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11723                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
11724                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
11725                 </links>
11726         </class>
11727
11728         <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">
11729                 <oils_persist:source_definition><![CDATA[
11730
11731             SELECT
11732                 po.ordering_agency AS ordering_agency,
11733                 po.id AS purchase_order,
11734                 li.id AS lineitem,
11735                 lid.id AS lineitem_detail,
11736                 cpa.id AS claim_policy_action
11737             FROM
11738                 acq.lineitem_detail lid
11739                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
11740                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
11741                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
11742                 JOIN acq.claim_policy_action cpa ON (
11743                     cpa.claim_policy = cp.id
11744
11745                     -- we only care about claim policy actions whose claim
11746                     -- interval we'd reached or exceeded
11747                     AND (NOW() - cpa.action_interval) > po.order_date
11748
11749                     -- filter out all claim policy actions where claim events
11750                     -- have occurred on or after the action's action_interval
11751                     AND NOT EXISTS (
11752                         SELECT 1
11753                         FROM
11754                             acq.claim_event evt
11755                             JOIN acq.claim claim ON (
11756                                 claim.id = evt.claim
11757                                 AND claim.lineitem_detail = lid.id
11758                             )
11759                         WHERE
11760                             evt.event_date >= (po.order_date + cpa.action_interval)
11761                     )
11762                 )
11763             WHERE
11764                 lid.cancel_reason IS NULL
11765                 AND li.cancel_reason IS NULL -- belt/suspenders
11766                 AND po.cancel_reason IS NULL -- belt/suspenders
11767                 AND lid.recv_time IS NULL
11768                 AND po.state = 'on-order'
11769             ORDER BY 1, 2, 3, 4, 5
11770
11771                 ]]></oils_persist:source_definition>
11772                 <fields>
11773                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
11774                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
11775                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11776                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11777                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
11778                 </fields>
11779                 <links>
11780                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
11781                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
11782                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11783                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11784                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
11785                 </links>
11786         </class>
11787         <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">
11788                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11789                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11790                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11791                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11792                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11793                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11794                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11795                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11796                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11797                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11798                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11799                 </fields>
11800                 <links>
11801                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11802                 </links>
11803     </class>
11804         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
11805                 <oils_persist:source_definition><![CDATA[
11806             SELECT * FROM acq.lineitem_summary 
11807                                 WHERE item_count > (invoice_count + cancel_count)
11808         ]]></oils_persist:source_definition>
11809                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11810                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11811                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11812                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11813                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11814                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11815                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11816                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11817                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11818                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11819                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11820                 </fields>
11821                 <links>
11822                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11823                 </links>
11824     </class>
11825         <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">
11826                 <oils_persist:source_definition><![CDATA[
11827
11828                         SELECT  t.*
11829                           FROM  action.transit_copy t
11830                                 JOIN actor.org_unit AS s ON (t.source = s.id)
11831                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
11832                           WHERE s.parent_ou <> d.parent_ou
11833
11834                 ]]></oils_persist:source_definition>
11835                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
11836                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
11837                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
11838                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
11839                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
11840                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
11841                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
11842                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
11843                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
11844                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
11845                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
11846                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
11847                 </fields>
11848                 <links>
11849                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
11850                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
11851                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
11852                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
11853                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11854                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
11855                 </links>
11856         </class>
11857
11858     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
11859                 <oils_persist:source_definition><![CDATA[
11860
11861         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
11862                 SELECT
11863                         cp.id as copy,
11864                         COUNT(circ.id),
11865                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11866                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11867                 FROM
11868                         asset.copy cp
11869                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
11870                 GROUP BY 1, 3, 4
11871                 UNION ALL
11872                 SELECT
11873                         cp.id as copy,
11874                         COUNT(circ.id),
11875                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11876                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11877                 FROM
11878                         asset.copy cp
11879                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
11880                 GROUP BY 1, 3, 4
11881                 UNION ALL
11882                 SELECT
11883                         id as copy,
11884                         circ_count,
11885                         -1 AS year,
11886                         false as is_renewal
11887                 FROM
11888                         extend_reporter.legacy_circ_count
11889         )x GROUP BY 1, 3, 4
11890
11891                 ]]></oils_persist:source_definition>
11892         <fields>
11893             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
11894             <field reporter:label="Count" name="count" reporter:datatype="int"/>
11895             <field reporter:label="Year" name="year" reporter:datatype="int"/>
11896             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
11897         </fields>
11898                 <links>
11899                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11900                 </links>
11901                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11902                         <actions>
11903                                 <retrieve/>
11904                         </actions>
11905                 </permacrud>
11906     </class>
11907
11908         <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">
11909                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
11910                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
11911                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
11912                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
11913                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
11914                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
11915                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
11916                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
11917                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
11918                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
11919                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
11920                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
11921                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
11922                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
11923                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
11924                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
11925                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
11926                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
11927                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
11928                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
11929                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
11930                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
11931                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
11932                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
11933                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
11934                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
11935                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
11936                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
11937                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
11938                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
11939                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
11940                 </fields>
11941                 <links>
11942                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
11943                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
11944                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
11945                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11946                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
11947                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11948                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11949                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
11950                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
11951                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
11952                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
11953                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
11954                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
11955                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
11956                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
11957                 </links>
11958         </class>
11959
11960     <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">
11961         <fields oils_persist:primary="id">
11962             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11963             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11964             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11965             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11966             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11967             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11968             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11969             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11970             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11971             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11972             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11973             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11974             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11975             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11976             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11977             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11978             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11979             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11980             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11981             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11982             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11983             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11984             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11985             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11986             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11987             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11988             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11989             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11990             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11991             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11992             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11993             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11994             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11995             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11996         </fields>
11997         <links>
11998             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11999             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12000             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12001             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12002             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
12003             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
12004             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
12005             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
12006         </links>
12007     </class>
12008
12009     <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">
12010         <fields oils_persist:primary="id">
12011             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12012             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12013             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12014             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12015         </fields>
12016         <links>
12017             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12018             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12019         </links>
12020     </class>
12021
12022     <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">
12023         <fields oils_persist:primary="owning_lib">
12024             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12025             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12026             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12027         </fields>
12028         <links>
12029             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12030         </links>
12031     </class>
12032
12033     <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">
12034         <fields oils_persist:primary="id">
12035             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12036             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12037             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12038             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12039             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12040         </fields>
12041         <links>
12042             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12043             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12044             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12045         </links>
12046     </class>
12047
12048     <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">
12049         <fields oils_persist:primary="circ_lib">
12050             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12051             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12052             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12053             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12054         </fields>
12055         <links>
12056             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12057             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12058         </links>
12059     </class>
12060
12061     <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">
12062         <fields oils_persist:primary="id">
12063             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12064             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12065             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12066             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12067             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12068         </fields>
12069         <links>
12070             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12071             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12072             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12073         </links>
12074     </class>
12075
12076     <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">
12077         <fields oils_persist:primary="home_ou">
12078             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12079             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12080             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12081             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12082         </fields>
12083         <links>
12084             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12085             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12086         </links>
12087     </class>
12088         <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">
12089                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
12090                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
12091                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
12092                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
12093                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
12094                 </fields>
12095                 <links>
12096                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12097                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
12098                 </links>
12099                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12100                         <actions>
12101                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12102                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
12103                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12104                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12105                         </actions>
12106                 </permacrud>
12107         </class>
12108         <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">
12109                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
12110                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
12111                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
12112                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
12113                 </fields>
12114                 <links>
12115                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
12116                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
12117                         </links>
12118                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12119                 <actions>
12120                                 <create permission="ADMIN_ACQ_FUND_TAG">
12121                                         <context link="tag" field="owner"/>
12122                                 </create>
12123                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
12124                                         <context link="tag" field="owner"/>
12125                                 </retrieve>
12126                                 <update permission="ADMIN_ACQ_FUND_TAG">
12127                                         <context link="tag" field="owner"/>
12128                                 </update>
12129                                 <delete permission="ADMIN_ACQ_FUND_TAG">
12130                                         <context link="tag" field="owner"/>
12131                                 </delete>
12132                         </actions>
12133                 </permacrud>
12134         </class>
12135         <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">
12136                 <oils_persist:source_definition><![CDATA[
12137                 SELECT
12138                         poi.purchase_order AS purchase_order,
12139                         ii.invoice AS invoice,
12140                         NULL AS lineitem,
12141                         poi.id AS po_item,
12142                         NULL AS picklist
12143                 FROM
12144                         acq.po_item poi
12145                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
12146                 UNION SELECT
12147                         jub.purchase_order AS purchase_order,
12148                         ie.invoice AS invoice,
12149                         jub.id AS lineitem,
12150                         NULL AS po_item,
12151                         jub.picklist AS picklist
12152                 FROM
12153                         acq.lineitem jub
12154                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
12155                 UNION SELECT
12156                         ii.purchase_order AS purchase_order,
12157                         ii.invoice AS invoice,
12158                         NULL AS lineitem,
12159                         NULL AS po_item,
12160                         NULL AS picklist
12161                 FROM
12162                         acq.invoice_item ii
12163                 WHERE ii.po_item IS NULL
12164                 UNION SELECT
12165                         ie.purchase_order AS purchase_order,
12166                         ie.invoice AS invoice,
12167                         NULL AS lineitem,
12168                         NULL AS po_item,
12169                         NULL AS picklist
12170                 FROM
12171                         acq.invoice_entry ie
12172                 WHERE ie.lineitem IS NULL
12173                 UNION SELECT
12174                         NULL AS purchase_order,
12175                         NULL AS invoice,
12176                         jub.id AS lineitem,
12177                         NULL AS po_item,
12178                         jub.picklist AS picklist
12179                 FROM
12180                         acq.lineitem jub
12181                 WHERE jub.purchase_order IS NULL
12182                 ]]></oils_persist:source_definition>
12183                 <fields>
12184                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
12185                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
12186                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
12187                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
12188                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
12189                 </fields>
12190                 <links>
12191                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
12192                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
12193                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
12194                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
12195                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
12196                 </links>
12197         </class>
12198         <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">
12199                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
12200                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12201                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
12202                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
12203                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
12204                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
12205                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12206                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
12207                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
12208                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
12209                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
12210                 </fields>
12211                 <links>
12212                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
12213                 </links>
12214                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12215                         <actions>
12216                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12217                                 <retrieve/>
12218                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12219                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12220                         </actions>
12221                 </permacrud>
12222         </class>
12223
12224         <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">
12225                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
12226                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12227                         <field name="date_applied" reporter:datatype="timestamp"/>
12228                         <field name="org" reporter:datatype="org_unit"/>
12229                         <field name="original_value" reporter:datatype="text"/>
12230                         <field name="new_value" reporter:datatype="text"/>
12231                         <field name="field_name" reporter:datatype="link"/>
12232                 </fields>
12233                 <links>
12234                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
12235                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
12236                 </links>
12237                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12238                         <actions>
12239                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
12240                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
12241                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12242                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12243                         </actions>
12244                 </permacrud>
12245         </class>
12246         <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">
12247                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12248                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12249                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12250                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12251                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12252                 </fields>
12253                 <links>
12254                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12255                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
12256                 </links>
12257         </class>
12258         <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">
12259                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12260                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12261                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12262                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12263                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12264                 </fields>
12265                 <links>
12266                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12267                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
12268                 </links>
12269         </class>
12270         <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">
12271                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
12272                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
12273                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
12274                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
12275                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
12276                 </fields>
12277                 <links>
12278                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
12279                 </links>
12280                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12281                         <actions>
12282                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12283                                 <retrieve/>
12284                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12285                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12286                         </actions>
12287                 </permacrud>
12288         </class>
12289         <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">
12290                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
12291                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12292                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
12293                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
12294                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
12295                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
12296                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
12297                 </fields>
12298                 <links>
12299                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
12300                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
12301                 </links>
12302                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12303                         <actions>
12304                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12305                                 <retrieve/>
12306                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12307                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12308                         </actions>
12309                 </permacrud>
12310         </class>
12311         <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">
12312                 <fields oils_persist:primary="code">
12313                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
12314                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
12315                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12316                 </fields>
12317                 <links>
12318                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12319                 </links>
12320                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12321                         <actions>
12322                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12323                                 <retrieve/>
12324                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12325                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12326                         </actions>
12327                 </permacrud>
12328         </class>
12329         <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">
12330                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
12331                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12332                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
12333                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12334                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12335                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
12336                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
12337                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12338                 </fields>
12339                 <links>
12340                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
12341                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12342                 </links>
12343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12344                         <actions>
12345                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
12346                                 <retrieve/>
12347                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
12348                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
12349                         </actions>
12350                 </permacrud>
12351         </class>
12352         <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">
12353                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
12354                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12355                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
12356                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
12357                 </fields>
12358                 <links>
12359                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12360                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
12361                 </links>
12362                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12363                         <actions>
12364                                 <create permission="UPDATE_COPY">
12365                     <context link="copy" field="circ_lib"/>
12366                 </create>
12367                                 <retrieve/>
12368                                 <update permission="UPDATE_COPY">
12369                     <context link="copy" field="circ_lib"/>
12370                 </update>
12371                                 <delete permission="UPDATE_COPY">
12372                     <context link="copy" field="circ_lib"/>
12373                 </delete>
12374                         </actions>
12375                 </permacrud>
12376         </class>
12377         <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">
12378         <oils_persist:source_definition><![CDATA[
12379         SELECT ahcm.target_copy AS id,count(*) AS count
12380          FROM
12381          action.hold_request ahr,
12382          action.hold_copy_map ahcm
12383          WHERE
12384          ahr.cancel_time IS NULL AND
12385          ahr.fulfillment_time IS NULL AND
12386          ahr.capture_time IS NULL AND
12387          ahr.id = ahcm.hold
12388          GROUP BY ahcm.target_copy
12389         ]]></oils_persist:source_definition>
12390         <fields oils_persist:primary="id">
12391             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12392             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
12393         </fields>
12394         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12395             <actions>
12396                <retrieve/>
12397             </actions>
12398         </permacrud>
12399         </class>
12400
12401         <!-- ********************************************************************************************************************* -->
12402
12403 </IDL>
12404
12405 <!--
12406     vim:noet:ts=4:sw=4:
12407 -->