]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
2254d61cac18ea18f04a8f5cd86cf7893c6641b4
[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 MAX(value) FROM (
1519                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1520                                 'circ.staff.max_visible_event_age',
1521                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1522                         ) UNION
1523                         SELECT '1000 YEARS'::INTERVAL AS value
1524                 ) ous)
1525                 ]]></oils_persist:source_definition>
1526                 <fields oils_persist:primary="id">
1527                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1528                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1529                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1530                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1531                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1532                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1533                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1534                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1535                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1536                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1537                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1538                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1539                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1540                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1541                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1542                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1543                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1544                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1545                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1546                 </fields>
1547                 <links>
1548                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1549                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1550                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1551                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1552                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1553                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1554                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1555                 </links>
1556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1557                         <actions>
1558                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1559                         </actions>
1560                 </permacrud>
1561         </class>
1562
1563         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1564                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1565                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1566                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1567                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1568                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1569                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1570                 </fields>
1571                 <links>
1572                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1573                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1574                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1575                 </links>
1576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1577                         <actions>
1578                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1579                         </actions>
1580                 </permacrud>
1581         </class>
1582
1583         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
1584                 <fields oils_persist:primary="code">
1585                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1586                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1587                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1588                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1589                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1590                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1591                 </fields>
1592                 <links/>
1593         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1594             <actions>
1595                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1596                 <retrieve/>
1597                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1598                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1599             </actions>
1600         </permacrud>
1601         </class>
1602
1603         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
1604                 <fields oils_persist:primary="code">
1605                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1606                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1607                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1608                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1609                 </fields>
1610                 <links/>
1611         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1612             <actions>
1613                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1614                 <retrieve/>
1615                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1616                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1617             </actions>
1618         </permacrud>
1619         </class>
1620
1621         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
1622                 <fields oils_persist:primary="code">
1623                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1624                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1625                 </fields>
1626                 <links/>
1627         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1628             <actions>
1629                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1630                 <retrieve/>
1631                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1632                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1633             </actions>
1634         </permacrud>
1635         </class>
1636
1637         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
1638                 <fields oils_persist:primary="code">
1639                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1640                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1641                 </fields>
1642                 <links/>
1643         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1644             <actions>
1645                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1646                 <retrieve/>
1647                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1648                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1649             </actions>
1650         </permacrud>
1651         </class>
1652
1653         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
1654                 <fields oils_persist:primary="code">
1655                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1656                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1657                 </fields>
1658                 <links/>
1659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1660             <actions>
1661                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1662                 <retrieve/>
1663                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1664                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1665             </actions>
1666         </permacrud>
1667         </class>
1668
1669         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1670                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1671                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1672                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1673                 </fields>
1674                 <links/>
1675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1676             <actions>
1677                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1678                 <retrieve/>
1679                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1680                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1681             </actions>
1682         </permacrud>
1683         </class>
1684
1685         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1686                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1687                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1688                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1689                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1690                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1691                 </fields>
1692         <links>
1693             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1694             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1695             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1696         </links>
1697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1698             <actions>
1699                 <create permission="UPDATE_COPY">
1700                     <context link="target_copy" field="circ_lib"/>
1701                 </create>
1702                 <retrieve/>
1703                 <update permission="UPDATE_COPY">
1704                     <context link="target_copy" field="circ_lib"/>
1705                 </update>
1706                 <delete permission="UPDATE_COPY">
1707                     <context link="target_copy" field="circ_lib"/>
1708                 </delete>
1709             </actions>
1710         </permacrud>
1711         </class>
1712
1713         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
1714                 <fields oils_persist:primary="code">
1715                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1716                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1717                 </fields>
1718                 <links/>
1719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1720             <actions>
1721                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1722                 <retrieve/>
1723                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1724                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1725             </actions>
1726         </permacrud>
1727         </class>
1728
1729         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
1730                 <fields oils_persist:primary="code">
1731                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1732                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1733                 </fields>
1734                 <links/>
1735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1736             <actions>
1737                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1738                 <retrieve/>
1739                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1740                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1741             </actions>
1742         </permacrud>
1743         </class>
1744
1745         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
1746                 <fields oils_persist:primary="code">
1747                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1748                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1749                 </fields>
1750                 <links/>
1751         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1752             <actions>
1753                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1754                 <retrieve/>
1755                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1756                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1757             </actions>
1758         </permacrud>
1759         </class>
1760
1761     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1762         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1763             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1764             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1765             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1766             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1767             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1768             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1769             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1770             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1771             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1772             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1773             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1774             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1775             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1776             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1777             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1778             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1779             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1780         </fields>
1781         <links/>
1782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1783             <actions>
1784                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1785                 <retrieve/>
1786                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1787                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1788             </actions>
1789         </permacrud>
1790     </class>
1791
1792     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1793         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1794             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1795             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1796             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1797             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1798             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1799             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1800             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1801             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1802             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1803             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1804             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1805             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1806             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1807             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1808             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1809             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1810             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1811             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1812             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1813         </fields>
1814         <links/>
1815         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1816             <actions>
1817                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1818                 <retrieve/>
1819                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1820                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1821             </actions>
1822         </permacrud>
1823     </class>
1824
1825     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1826         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1827             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1828             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1829             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1830             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1831             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1832         </fields>
1833         <links>
1834             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1835             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1836             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1837         </links>
1838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1839             <actions>
1840                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1841                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1842                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1843                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1844             </actions>
1845         </permacrud>
1846     </class>
1847
1848         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
1849                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1850                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1851                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1852                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1853                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1854                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1855                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1856                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1857                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1858                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1859                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1860                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1861                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1862                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1863                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1864                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1865                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1866             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1867                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1868                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1869                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1870                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1871                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1872                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1873                         <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">
2765                 <fields oils_persist:primary="name">
2766                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2767                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2768                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2769                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2770                 </fields>
2771                 <links/>
2772         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2773             <actions>
2774                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2775                 <retrieve/>
2776                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2777                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2778             </actions>
2779         </permacrud>
2780         </class>
2781
2782         <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias" oils_persist:field_safe="true">
2783                 <fields oils_persist:primary="alias">
2784                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2785                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2786                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2787                 </fields>
2788                 <links>
2789                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2790                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2791                 </links>
2792         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2793             <actions>
2794                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2795                 <retrieve/>
2796                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2797                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2798             </actions>
2799         </permacrud>
2800         </class>
2801
2802         <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class" oils_persist:field_safe="true">
2803                 <fields oils_persist:primary="name">
2804                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2805                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2806                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2807                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2808                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2809                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2810                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2811                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2812                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2813                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2814                 </fields>
2815                 <links>
2816                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2817                 </links>
2818         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2819             <actions>
2820                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2821                 <retrieve/>
2822                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2823                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2824             </actions>
2825         </permacrud>
2826         </class>
2827
2828         <class id="cmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field" oils_persist:tablename="config.metabib_field" reporter:label="Metabib Field" oils_persist:field_safe="true">
2829                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2830                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2831                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2832                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2833                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2834                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2835                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2836                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2837                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2838                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2839                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2840                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2841                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2842                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2843                         <field reporter:label="Display Field?" name="display_field" reporter:datatype="bool" />
2844                 </fields>
2845                 <links>
2846                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2847                 </links>
2848         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2849             <actions>
2850                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2851                 <retrieve/>
2852                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2853                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2854             </actions>
2855         </permacrud>
2856         </class>
2857         <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">
2858                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2859                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2860                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2861                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2862                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2863                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2864                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2865                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2866                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2867                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2868                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2869                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2870                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2871                 </fields>
2872                 <links>
2873                 </links>
2874                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2875                         <actions>
2876                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2877                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2878                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2879                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2880                         </actions>
2881                 </permacrud>
2882         </class>
2883         <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">
2884                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2885                         <field name="id" reporter:datatype="id" />
2886                         <field name="name" reporter:datatype="text"/>
2887                         <field name="xpath" reporter:datatype="text"/>
2888                         <field name="format" reporter:datatype="link"/>
2889                         <field name="first_word" reporter:datatype="bool" />
2890                 </fields>
2891                 <links/>
2892         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2893             <actions>
2894                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2895                 <retrieve/>
2896                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2897                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2898             </actions>
2899         </permacrud>
2900         </class>
2901         <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">
2902                 <fields oils_persist:primary="code" oils_persist:sequence="">
2903                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2904                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2905                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2906                 </fields>
2907                 <links/>
2908         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2909             <actions>
2910                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2911                 <retrieve/>
2912                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2913                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2914             </actions>
2915         </permacrud>
2916         </class>
2917         <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">
2918                 <fields oils_persist:primary="code" oils_persist:sequence="">
2919                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2920                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2921                 </fields>
2922                 <links/>
2923         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2924             <actions>
2925                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2926                 <retrieve/>
2927                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2928                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2929             </actions>
2930         </permacrud>
2931         </class>
2932     <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">
2933         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2934             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2935             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2936             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2937             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2938         </fields>
2939         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2940             <actions>
2941                 <retrieve/>
2942             </actions>
2943         </permacrud>
2944     </class>
2945         <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">
2946                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2947                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2948                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2949                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2950                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2951                 </fields>
2952                 <links>
2953                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2954                 </links>
2955         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2956             <actions>
2957                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2958                 <retrieve/>
2959                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2960                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2961             </actions>
2962         </permacrud>
2963         </class>
2964         <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">
2965                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2966                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2967                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2968                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2969                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2970                 </fields>
2971                 <links>
2972                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2973                 </links>
2974         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2975             <actions>
2976                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2977                 <retrieve/>
2978                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2979                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2980             </actions>
2981         </permacrud>
2982         </class>
2983         <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">
2984                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2985                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2986                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2987                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2988                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2989                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2990                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2991                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2992                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2993                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2994                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2995                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2996                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2997                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2998                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2999                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3000                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3001                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3002                 </fields>
3003                 <links>
3004                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3005                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3006                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3007                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3008                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3009                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3010                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3011                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3012                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3013                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3014                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3015                 </links>
3016         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3017             <actions>
3018                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3019                 <retrieve/>
3020                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3021                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3022             </actions>
3023         </permacrud>
3024         </class>
3025         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3026                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3027                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3028                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3029                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3030                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3031                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3032                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3033                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3034                 </fields>
3035                 <links>
3036                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3037                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3038         </links>
3039         </class>
3040         <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">
3041                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3042                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3043                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3044                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3045                 </fields>
3046                 <links>
3047                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3048                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3049                 </links>
3050         </class>
3051         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3052                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3053                         <field name="id" reporter:datatype="id" />
3054                         <field name="value" oils_persist:i18n="true" />
3055                 </fields>
3056                 <links/>
3057         </class>
3058         <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">
3059                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3060                         <field name="balance_owed" reporter:datatype="money" />
3061                         <field name="total_owed" reporter:datatype="money" />
3062                         <field name="total_paid" reporter:datatype="money" />
3063                         <field name="usr" reporter:datatype="link"/>
3064                 </fields>
3065                 <links>
3066                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3067         </links>
3068         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3069             <actions>
3070                 <retrieve permission="VIEW_USER">
3071                     <context link="usr" field="home_ou"/>
3072                 </retrieve>
3073             </actions>
3074         </permacrud>
3075         </class>
3076         <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">
3077                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3078                         <field name="collector" />
3079                         <field name="enter_time" reporter:datatype="timestamp"/>
3080                         <field name="id" reporter:datatype="id" />
3081                         <field name="location" reporter:datatype="link"/>
3082                         <field name="usr" reporter:datatype="link"/>
3083                 </fields>
3084                 <links>
3085                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3086                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3087                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3088                 </links>
3089         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3090             <actions>
3091                 <create permission="money.collections_tracker.create" context_field="location"/>
3092                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3093                 <delete permission="money.collections_tracker.create" context_field="location"/>
3094             </actions>
3095         </permacrud>
3096         </class>
3097         <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">
3098                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3099                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3100                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3101                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3102                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3103                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3104                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3105                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3106                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3107                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3108                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3109                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3110                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3111                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3112                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3113                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3114                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3115                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3116                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3117                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3118                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3119                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3120                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3121                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3122                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3123                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3124                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3125                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3126                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3127                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3128                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3129                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3130                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3131                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3132                 </fields>
3133                 <links>
3134                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3135                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3136                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3137                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3138                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3139                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3140                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3141                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3142                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3143                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3144                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3145                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3146                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3147                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3148                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3149                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3150                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3151                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3152                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3153                         <link field="mattrs" reltype="might_have" key="id" map="" class="mraf"/>
3154                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3155                 </links>
3156         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3157             <actions>
3158                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3159                 <retrieve/>
3160                 <update permission="UPDATE_MARC" global_required="true"/>
3161                 <!-- 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. -->
3162                 <delete permission="DELETE_RECORD" global_required="true"/>
3163             </actions>
3164         </permacrud>
3165         </class>
3166         <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">
3167                 <fields oils_persist:primary="id">
3168                         <field name="dow_0_close" />
3169                         <field name="dow_0_open" />
3170                         <field name="dow_1_close" />
3171                         <field name="dow_1_open" />
3172                         <field name="dow_2_close" />
3173                         <field name="dow_2_open" />
3174                         <field name="dow_3_close" />
3175                         <field name="dow_3_open" />
3176                         <field name="dow_4_close" />
3177                         <field name="dow_4_open" />
3178                         <field name="dow_5_close" />
3179                         <field name="dow_5_open" />
3180                         <field name="dow_6_close" />
3181                         <field name="dow_6_open" />
3182                         <field name="id" reporter:datatype="id" />
3183                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3184                 </fields>
3185                 <links>
3186                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3187                 </links>
3188         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3189             <actions>
3190                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3191                 <retrieve/>
3192                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3193                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3194             </actions>
3195         </permacrud>
3196         </class>
3197         <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">
3198                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3199                         <field name="id" reporter:datatype="id" />
3200                         <field name="record" reporter:datatype="link"/>
3201                         <field name="label" reporter:datatype="text"/>
3202                         <field name="label_sortkey" reporter:datatype="text"/>
3203                         <field name="deleted" reporter:datatype="bool"/>
3204                 </fields>
3205                 <links>
3206                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3207                 </links>
3208         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3209             <actions>
3210                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3211                 <retrieve/>
3212                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3213                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3214             </actions>
3215         </permacrud>
3216         </class>
3217         <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">
3218                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3219                         <field name="id" reporter:datatype="id" />
3220                         <field name="target_copy" reporter:datatype="link" />
3221                         <field name="part" reporter:datatype="link"/>
3222                 </fields>
3223                 <links>
3224                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3225                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3226                 </links>
3227         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3228             <actions>
3229                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3230                 <retrieve/>
3231                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3232                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3233             </actions>
3234         </permacrud>
3235         </class>
3236         <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">
3237                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3238                         <field name="close_end" reporter:datatype="timestamp" />
3239                         <field name="close_start" reporter:datatype="timestamp" />
3240                         <field name="id" reporter:datatype="id" />
3241                         <field name="org_unit" reporter:datatype="org_unit"/>
3242                         <field name="reason" reporter:datatype="text"/>
3243                         <field name="full_day" reporter:datatype="bool"/>
3244                         <field name="multi_day" reporter:datatype="bool"/>
3245                 </fields>
3246                 <links>
3247                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3248                 </links>
3249         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3250             <actions>
3251                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3252                 <retrieve/>
3253                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3254                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3255             </actions>
3256         </permacrud>
3257         </class>
3258         <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">
3259                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3260                         <field name="extended" reporter:datatype="interval"/>
3261                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3262                         <field name="max_renewals" reporter:datatype="int" />
3263                         <field name="name" reporter:datatype="text"/>
3264                         <field name="normal" reporter:datatype="interval"/>
3265                         <field name="shrt" reporter:datatype="interval"/>
3266                 </fields>
3267                 <links>
3268                 </links>
3269         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3270             <actions>
3271                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3272                 <retrieve/>
3273                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3274                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3275             </actions>
3276         </permacrud>
3277         </class>
3278
3279         <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">
3280                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3281                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3282                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3283             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3284                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3285             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3286                 </fields>
3287                 <links>
3288             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3289                 </links>
3290                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3291             <actions>
3292                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3293                 <retrieve/>
3294                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3295                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3296             </actions>
3297                 </permacrud>
3298         </class>
3299
3300         <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">
3301                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3302                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3303                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3304                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3305             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3306                 </fields>
3307                 <links>
3308                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3309                 </links>
3310                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3311             <actions>
3312                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3313                 <retrieve/>
3314                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3315                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3316             </actions>
3317                 </permacrud>
3318         </class>
3319
3320         <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">
3321                 <fields oils_persist:primary="id" oils_persist:sequence="">
3322                         <field name="balance_owed" reporter:datatype="money"/>
3323                         <field name="id" reporter:datatype="id" />
3324                         <field name="last_billing_note" reporter:datatype="text"/>
3325                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3326                         <field name="last_billing_type" reporter:datatype="text"/>
3327                         <field name="last_payment_note" reporter:datatype="text"/>
3328                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3329                         <field name="last_payment_type" reporter:datatype="text"/>
3330                         <field name="total_owed" reporter:datatype="money"/>
3331                         <field name="total_paid" reporter:datatype="money"/>
3332                         <field name="usr" reporter:datatype="link"/>
3333                         <field name="xact_finish" reporter:datatype="timestamp" />
3334                         <field name="xact_start" reporter:datatype="timestamp" />
3335                         <field name="xact_type" reporter:datatype="text"/>
3336                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3337                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3338                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3339                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3340                         <field name="billing_location" reporter:datatype="link"/>
3341                 </fields>
3342                 <links>
3343                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3344                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3345                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3346                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3347                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3348                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3349                 </links>
3350                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3351                         <actions>
3352                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3353                                         <context link="usr" field="home_ou" />
3354                                 </retrieve>
3355                         </actions>
3356                 </permacrud>
3357         </class>
3358         <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">
3359                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3360                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3361                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3362                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3363                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3364                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3365                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3366                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3367                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3368                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3369                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3370                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3371                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3372                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3373                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3374                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3375                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3376                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3377                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3378                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3379                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3380                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3381                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3382                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3383                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3384                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3385                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3386                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3387                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3388                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3389                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3390                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3391                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3392                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3393                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3394                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3395                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3396                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3397                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3398                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3399                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3400                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3401                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3402                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3403                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3404                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3405                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3406                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3407                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3408                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3409                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3410                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3411                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3412                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3413                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3414                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3415                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3416                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3417                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3418                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3419                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3420                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3421                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3422                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3423                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3424                 </fields>
3425                 <links>
3426                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3427                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3428                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3429                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3430                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3431                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3432                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3433                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3434                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3435                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3436                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3437                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3438                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3439                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3440                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3441                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3442                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3443                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3444                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3445                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3446                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3447                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3448                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3449                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3450                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3451                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3452                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3453                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3454                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3455                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3456                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3457                 </links>
3458                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3459                         <actions>
3460                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3461                         </actions>
3462                 </permacrud>
3463         </class>
3464         <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">
3465                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3466                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3467                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3468                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3469                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3470                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3471                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3472                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3473                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3474         </fields>
3475                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3476                         <actions>
3477                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3478                                 <retrieve/>
3479                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3480                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3481                         </actions>
3482                 </permacrud>
3483         </class>
3484         <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">
3485                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3486                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3487                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3488                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3489                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3490         </fields>
3491         <links>
3492                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3493                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3494                 </links>
3495                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3496                         <actions>
3497                                 <retrieve permission="RUN_REPORTS">
3498                                         <context link="usr" field="home_ou" />
3499                                 </retrieve>
3500                         </actions>
3501                 </permacrud>
3502         </class>
3503         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3504                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3505                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3506                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3507                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3508                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3509                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3510                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3511         </fields>
3512         <links>
3513                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3514                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3515                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3516                 </links>
3517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3518                         <actions>
3519                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3520                                         <context link="usr" field="home_ou" />
3521                                         <context link="ws" field="owning_lib" />
3522                                 </retrieve>
3523                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3524                                         <context link="usr" field="home_ou" />
3525                                         <context link="ws" field="owning_lib" />
3526                                 </create>
3527                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3528                                         <context link="usr" field="home_ou" />
3529                                         <context link="ws" field="owning_lib" />
3530                                 </update>
3531                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3532                                         <context link="usr" field="home_ou" />
3533                                         <context link="ws" field="owning_lib" />
3534                                 </delete>
3535                         </actions>
3536                 </permacrud>
3537         </class>
3538         <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">
3539                 <fields oils_persist:primary="name">
3540                         <field name="name" reporter:datatype="text"/>
3541                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3542                 </fields>
3543                 <links/>
3544                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3545                         <actions>
3546                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3547                                 <retrieve/>
3548                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3549                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3550                         </actions>
3551                 </permacrud>
3552         </class>
3553         <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">
3554                 <fields oils_persist:primary="name">
3555                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3556                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3557                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3558                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3559                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3560                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3561                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3562                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3563                 </fields>
3564                 <links>
3565                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3566                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3567                 </links>
3568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3569                         <actions>
3570                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3571                                 <retrieve/>
3572                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3573                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3574                         </actions>
3575                 </permacrud>
3576         </class>
3577         <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">
3578                 <fields oils_persist:primary="name">
3579                         <field name="name" reporter:datatype="text"/>
3580                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3581                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3582                         <field name="datatype" reporter:datatype="text"/>
3583                         <field name="view_perm" reporter:datatype="link"/>
3584                         <field name="update_perm" reporter:datatype="link"/>
3585                         <field name="fm_class" reporter:datatype="text"/>
3586                         <field name="grp" reporter:datatype="link"/>
3587                 </fields>
3588                 <links>
3589                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3590                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3591                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3592                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3593                 </links>
3594                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3595                         <actions>
3596                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3597                                 <retrieve/>
3598                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3599                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3600                         </actions>
3601                 </permacrud>
3602         </class>
3603         <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">
3604                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3605                         <field name="id" />
3606                         <field name="name"  reporter:datatype="text"/>
3607                         <field name="org_unit" reporter:datatype="org_unit"/>
3608                         <field name="value"  reporter:datatype="text"/>
3609                 </fields>
3610                 <links>
3611                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3612                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3613                 </links>
3614         </class>
3615         <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">
3616                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3617                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3618                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3619                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3620                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3621                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3622                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3623                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3624                 </fields>
3625                 <links>
3626                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3627                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3628                 </links>
3629         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3630             <actions>
3631                 <create permission="CREATE_COPY_NOTE">
3632                     <context link="owning_copy" field="circ_lib"/>
3633                 </create>
3634                 <retrieve permission="VIEW_COPY_NOTES">
3635                     <context link="owning_copy" field="circ_lib"/>
3636                 </retrieve>
3637                 <update permission="UPDATE_COPY_NOTE">
3638                     <context link="owning_copy" field="circ_lib"/>
3639                 </update>
3640                 <delete permission="DELETE_COPY_NOTE">
3641                     <context link="owning_copy" field="circ_lib"/>
3642                 </delete>
3643             </actions>
3644         </permacrud>
3645         </class>
3646         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3647                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3648                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3649                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3650                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3651                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3652                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3653                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3654                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3655                 </fields>
3656                 <links>
3657                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3658                 </links>
3659         </class>
3660         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3661                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3662                         <field name="fingerprint"  reporter:datatype="text"/>
3663                         <field name="id" reporter:datatype="id" />
3664                         <field name="master_record" reporter:datatype="link"/>
3665                         <field name="mods"  reporter:datatype="text"/>
3666                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3667                 </fields>
3668                 <links>
3669                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3670                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3671                 </links>
3672         </class>
3673         <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">
3674                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3675                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3676                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3677                 </fields>
3678                 <links/>
3679         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3680             <actions>
3681                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3682                 <retrieve/>
3683                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3684                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3685             </actions>
3686         </permacrud>
3687         </class>
3688         <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">
3689                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3690                         <field name="code"  reporter:datatype="text"/>
3691                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3692                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3693                 </fields>
3694                 <links/>
3695         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3696             <actions>
3697                 <create permission="CREATE_PERM" global_required="true"/>
3698                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3699                 <update permission="UPDATE_PERM" global_required="true"/>
3700                 <delete permission="DELETE_PERM" global_required="true"/>
3701             </actions>
3702         </permacrud>
3703         </class>
3704         <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">
3705                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3706                         <field name="id" reporter:datatype="id" />
3707                         <field name="metarecord" reporter:datatype="link"/>
3708                         <field name="source" reporter:datatype="link"/>
3709                 </fields>
3710                 <links>
3711                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3712                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3713                 </links>
3714         </class>
3715         <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">
3716                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3717                         <field name="id" reporter:datatype="id" />
3718                         <field name="field" reporter:datatype="link"/>
3719                         <field name="source" reporter:datatype="link"/>
3720                         <field name="value"  reporter:datatype="text"/>
3721                 </fields>
3722                 <links>
3723                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3724                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3725                 </links>
3726         </class>
3727         <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">
3728                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3729                         <field name="id" reporter:datatype="id" />
3730                         <field name="value" reporter:datatype="text"/>
3731                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3732                 </fields>
3733                 <links>
3734                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3735                 </links>
3736         </class>
3737         <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">
3738                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3739                         <field name="id" reporter:datatype="id" />
3740                         <field name="entry" reporter:datatype="link"/>
3741                         <field name="def" reporter:datatype="link"/>
3742                         <field name="source" reporter:datatype="link"/>
3743                 </fields>
3744                 <links>
3745                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3746                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3747                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3748                 </links>
3749         </class>
3750         <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">
3751                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3752                         <field name="id" reporter:datatype="id" />
3753                         <field name="entry" reporter:datatype="link"/>
3754                         <field name="simple_heading" reporter:datatype="link"/>
3755                 </fields>
3756                 <links>
3757                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3758                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3759                 </links>
3760         </class>
3761         <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">
3762                 <oils_persist:source_definition>
3763                         SELECT * FROM metabib.author_field_entry
3764                                                 UNION ALL
3765                         SELECT * FROM metabib.keyword_field_entry
3766                                                 UNION ALL
3767                         SELECT * FROM metabib.identifier_field_entry
3768                                                 UNION ALL
3769                         SELECT * FROM metabib.title_field_entry
3770                                                 UNION ALL
3771                         SELECT * FROM metabib.subject_field_entry
3772                                                 UNION ALL
3773                         SELECT * FROM metabib.series_field_entry
3774                 </oils_persist:source_definition>
3775                 <fields>
3776                         <field name="field" reporter:datatype="link"/>
3777                         <field name="id" reporter:datatype="id" />
3778                         <field name="source" reporter:datatype="link"/>
3779                         <field name="value"  reporter:datatype="text"/>
3780                 </fields>
3781                 <links>
3782                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3783                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3784                 </links>
3785         </class>
3786         <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">
3787                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3788                         <field name="field" reporter:datatype="link"/>
3789                         <field name="id" reporter:datatype="id" />
3790                         <field name="source" reporter:datatype="link"/>
3791                         <field name="value"  reporter:datatype="text"/>
3792                 </fields>
3793                 <links>
3794                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3795                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3796                 </links>
3797         </class>
3798         <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">
3799                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3800                         <field name="accepting_usr" reporter:datatype="link"/>
3801                         <field name="amount" reporter:datatype="money" />
3802                         <field name="amount_collected" reporter:datatype="money" />
3803                         <field name="cash_drawer" reporter:datatype="link"/>
3804                         <field name="id" reporter:datatype="id" />
3805                         <field name="note"  reporter:datatype="text"/>
3806                         <field name="payment_ts" reporter:datatype="timestamp"/>
3807                         <field name="xact" reporter:datatype="link"/>
3808                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3809                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3810                 </fields>
3811                 <links>
3812                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3813                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3814                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3815                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3816                 </links>
3817         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3818             <actions>
3819                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3820                     <context link="xact" jump="usr" field="home_ou"/>
3821                 </retrieve>
3822                         </actions>
3823                 </permacrud>
3824         </class>
3825         <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">
3826                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3827                         <field name="accepting_usr" reporter:datatype="link"/>
3828                         <field name="amount" reporter:datatype="money" />
3829                         <field name="amount_collected" reporter:datatype="money" />
3830                         <field name="id" reporter:datatype="id" />
3831                         <field name="note"  reporter:datatype="text"/>
3832                         <field name="payment_ts" reporter:datatype="timestamp"/>
3833                         <field name="xact" reporter:datatype="link"/>
3834                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3835                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3836                 </fields>
3837                 <links>
3838                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3839                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3840                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3841                 </links>
3842         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3843             <actions>
3844                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3845                     <context link="xact" jump="usr" field="home_ou"/>
3846                 </retrieve>
3847                         </actions>
3848                 </permacrud>
3849         </class>
3850         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3851                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3852                         <field name="accepting_usr" reporter:datatype="link"/>
3853                         <field name="amount" reporter:datatype="money" />
3854                         <field name="amount_collected" reporter:datatype="money" />
3855                         <field name="id" reporter:datatype="id" />
3856                         <field name="note"  reporter:datatype="text"/>
3857                         <field name="payment_ts" reporter:datatype="timestamp"/>
3858                         <field name="xact" reporter:datatype="link"/>
3859                         <field name="billing" reporter:datatype="link"/>
3860                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3861                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3862                 </fields>
3863                 <links>
3864                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3865                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3866                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3867                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3868                 </links>
3869         </class>
3870         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3871                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3872                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3873                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3874                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3875                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3876                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3877                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3878                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3879                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3880                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3881                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3882                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3883                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3884                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3885                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3886                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3887                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3888                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3889                 </fields>
3890                 <links>
3891                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3892                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3893                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3894                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3895                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3896                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3897                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3898                 </links>
3899         </class>
3900
3901         <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">
3902                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3903                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3904                         <field name="name"  reporter:datatype="text"/>
3905                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3906                         <field name="block_list" reporter:datatype="text"/>
3907                         <field name="staff_alert" reporter:datatype="bool"/>
3908                         <field name="org_depth" reporter:datatype="int"/>
3909                         <field name="ignore_proximity" reporter:datatype="int"/>
3910                 </fields>
3911                 <links/>
3912         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3913             <actions>
3914                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3915                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3916                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3917                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3918             </actions>
3919         </permacrud>
3920         </class>
3921         <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">
3922                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3923                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3924                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3925                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3926                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3927                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3928                 </fields>
3929                 <links>
3930                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3931                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3932                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3933         </links>
3934         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3935             <actions>
3936                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3937                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3938                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3939                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3940             </actions>
3941         </permacrud>
3942         </class>
3943         <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">
3944                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3945                         <field name="holdable" reporter:datatype="bool"/>
3946                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3947                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3948                         <field name="opac_visible" reporter:datatype="bool"/>
3949             <field name="copy_active" reporter:datatype="bool"/>
3950             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3951             <field name="is_available" reporter:datatype="bool"/>
3952                 </fields>
3953                 <links/>
3954         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3955             <actions>
3956                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3957                 <retrieve/>
3958                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3959                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3960             </actions>
3961         </permacrud>
3962         </class>
3963         <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">
3964                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3965                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3966                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3967                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3968                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3969                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3970                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3971                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3972                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3973                 </fields>
3974                 <links>
3975                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3976                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3977                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3978                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3979                 </links>
3980                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3981                         <actions>
3982                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3983                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3984                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3985                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3986                         </actions>
3987                 </permacrud>
3988         </class>
3989         <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">
3990                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3991                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3992                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3993                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3994                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3995                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3996                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3997                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3998                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3999                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4000                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4001                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4002                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4003                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4004                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4005                 </fields>
4006                 <links>
4007                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4008                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4009                 </links>
4010                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4011                         <actions>
4012                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4013                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4014                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4015                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4016                         </actions>
4017                 </permacrud>
4018         </class>
4019         <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">
4020                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4021                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4022                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4023                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4024                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4025                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4026                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4027                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4028                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4029                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4030                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4031                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4032                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4033                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4034                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4035                 </fields>
4036                 <links>
4037                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4038                 </links>
4039                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4040                         <actions>
4041                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4042                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4043                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4044                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4045                         </actions>
4046                 </permacrud>
4047         </class>
4048
4049
4050         <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">
4051                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4052                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4053                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4054                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4055                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4056                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4057                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4058                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4059                 </fields>
4060                 <links>
4061                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4062                 </links>
4063         </class>
4064
4065         <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">
4066                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4067                         <field name="call_number" />
4068                         <field name="create_date" reporter:datatype="timestamp"/>
4069                         <field name="creator" reporter:datatype="link"/>
4070                         <field name="id" reporter:datatype="id" />
4071                         <field name="pub" reporter:datatype="bool"/>
4072                         <field name="title"  reporter:datatype="text"/>
4073                         <field name="value"  reporter:datatype="text"/>
4074                 </fields>
4075                 <links>
4076                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4077                 </links>
4078         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4079             <actions>
4080                 <create permission="CREATE_VOLUME_NOTE">
4081                     <context link="call_number" field="owning_lib"/>
4082                 </create>
4083                 <retrieve permission="VIEW_VOLUME_NOTES">
4084                     <context link="call_number" field="owning_lib"/>
4085                 </retrieve>
4086                 <update permission="UPDATE_VOLUME_NOTE">
4087                     <context link="call_number" field="owning_lib"/>
4088                 </update>
4089                 <delete permission="DELETE_VOLUME_NOTE">
4090                     <context link="call_number" field="owning_lib"/>
4091                 </delete>
4092             </actions>
4093         </permacrud>
4094         </class>
4095         <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">
4096                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4097                         <field name="create_date" reporter:datatype="timestamp"/>
4098                         <field name="creator" reporter:datatype="link"/>
4099                         <field name="edit_date" reporter:datatype="timestamp"/>
4100                         <field name="editor" reporter:datatype="link"/>
4101                         <field name="id" reporter:datatype="id" />
4102                         <field name="record" reporter:datatype="link"/>
4103                         <field name="value" reporter:datatype="text"/>
4104                 </fields>
4105                 <links>
4106                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4107                 </links>
4108         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4109             <actions>
4110                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4111                 <retrieve/>
4112                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4113                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4114             </actions>
4115         </permacrud>
4116         </class>
4117         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4118         <oils_persist:source_definition>
4119 SELECT  usr,
4120         SUM(
4121             CASE
4122                 WHEN (
4123                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4124                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4125                 ) THEN 1
4126                 ELSE 0
4127             END
4128         ) AS out,
4129
4130         SUM(
4131             CASE
4132                 WHEN (
4133                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4134                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4135                 ) THEN 1
4136                 ELSE 0
4137             END
4138         ) AS overdue,
4139
4140         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4141         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4142         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4143   FROM  action.circulation
4144   WHERE checkin_time IS NULL
4145   GROUP BY 1
4146         </oils_persist:source_definition>
4147         <fields oils_persist:primary="usr">
4148             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4149             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4150             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4151             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4152             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4153             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4154         </fields>
4155         <links>
4156             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4157         </links>
4158         </class>
4159         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4160         <oils_persist:source_definition>
4161 SELECT  usr,
4162         STRING_AGG(
4163             CASE
4164                 WHEN (
4165                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4166                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4167                 ) THEN id::TEXT
4168                 ELSE '0'
4169             END
4170         ,',') AS out,
4171
4172         STRING_AGG(
4173             CASE
4174                 WHEN (
4175                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4176                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4177                 ) THEN id::TEXT
4178                 ELSE '0'
4179             END
4180         ,',') AS overdue,
4181
4182         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4183         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4184         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4185   FROM  action.circulation
4186   WHERE checkin_time IS NULL
4187   GROUP BY 1
4188         </oils_persist:source_definition>
4189         <fields oils_persist:primary="usr">
4190             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4191             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4192             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4193             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4194             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4195             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4196         </fields>
4197         <links>
4198             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4199         </links>
4200         </class>
4201         <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">
4202                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4203                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4204                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4205                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4206                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4207                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4208                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4209                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4210                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4211                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4212                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4213                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4214                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4215                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4216                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4217                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4218                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4219                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4220                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4221                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4222                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4223                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4224                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4225                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4226                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4227                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4228                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4229                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4230                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4231                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4232                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4233                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4234                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4235                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4236                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4237                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4238                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4239                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4240                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4241                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4242                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4243                 </fields>
4244                 <links>
4245                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4246                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4247                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4248                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4249                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4250                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4251                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4252                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4253                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4254                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4255                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4256                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4257                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4258                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4259                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4260                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4261                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4262                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4263                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4264                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4265                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4266                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4267                 </links>
4268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4269                         <actions>
4270                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4271                         </actions>
4272                 </permacrud>
4273         </class>
4274         <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">
4275                 <fields>
4276                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4277                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4278                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4279                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4280                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4281                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4282                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4283                 </fields>
4284                 <links>
4285                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4286                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4287                 </links>
4288                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4289                         <actions>
4290                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4291                         </actions>
4292                 </permacrud>
4293         </class>
4294         <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">
4295                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4296                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4297                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4298                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4299                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4300                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4301                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4302                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4303                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4304                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4305                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4306                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4307                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4308                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4309                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4310                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4311                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4312                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4313                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4314                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4315                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4316                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4317                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4318                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4319                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4320                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4321                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4322                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4323                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4324                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4325                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4326                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4327                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4328                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4329                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4330                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4331                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4332                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4333                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4334                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4335                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4336                 </fields>
4337                 <links>
4338                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4339                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4340                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4341                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4342                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4343                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4344                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4345                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4346                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4347                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4348                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4349                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4350                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4351                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4352                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4353                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4354                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4355                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4356                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4357                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4358                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4359                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4360                 </links>
4361                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4362                         <actions>
4363                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4364                         </actions>
4365                 </permacrud>
4366         </class>
4367
4368         <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">
4369                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4370                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4371                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4372                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4373                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4374                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4375                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4376                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4377                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4378                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4379                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4380                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4381                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4382                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4383                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4384                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4385                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4386                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4387                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4388                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4389                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4390                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4391                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4392                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4393                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4394                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4395                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4396                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4397                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4398                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4399                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4400                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4401                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4402                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4403                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4404                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4405                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4406                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4407                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4408                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4409                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4410                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4411                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4412                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4413                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4414                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4415                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4416                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4417                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4418                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4419                 </fields>
4420                 <links>
4421                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4422                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4423                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4424                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4425                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4426                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4427                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4428                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4429                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4430                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4431                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4432                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4433                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4434                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4435                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4436                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4437                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4438                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4439                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4440                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4441                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4442                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4443                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4444                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4445                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4446                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4447                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4448                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4449                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4450                 </links>
4451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4452                         <actions>
4453                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4454                         </actions>
4455                 </permacrud>
4456         </class>
4457         <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">
4458                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4459                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4460                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4461                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4462                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4463                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4464                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4465                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4466                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4467                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4468                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4469                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4470                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4471                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4472                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4473                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4474                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4475                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4476                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4477                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4478                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4479                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4480                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4481                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4482                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4483                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4484                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4485                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4486                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4487                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4488                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4489                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4490                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4491                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4492                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4493                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4494                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4495                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4496                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4497                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4498                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4499                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4500                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4501                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4502                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4503                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4504                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4505                 </fields>
4506                 <links>
4507                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4508                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4509                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4510                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4511                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4512                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4513                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4514                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4515                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4516                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4517                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4518                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4519                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4520                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4521                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4522                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4523                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4524                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4525                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4526                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4527                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4528                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4529                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4530                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4531                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4532                 </links>
4533         </class>
4534         <class id="auch" 
4535                 controller="open-ils.cstore" 
4536                 oils_obj:fieldmapper="action::user_circ_history" 
4537                 oils_persist:tablename="action.usr_circ_history" 
4538                 reporter:label="User Checkout History">
4539                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4540                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4541                         <!-- prevent reporting on the user that owns the checkout history -->
4542                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4543                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4544                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4545                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4546                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4547                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4548                 </fields>
4549                 <links>
4550                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4551                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4552                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4553                 </links>
4554         </class>
4555         <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">
4556                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4557                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4558                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4559                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4560                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4561                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4562                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4563                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4564                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4565                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4566                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4567                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4568                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4569                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4570                 </fields>
4571                 <links>
4572                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4573                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4574                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4575                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4576                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4577                 </links>
4578                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4579                         <actions>
4580                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4581                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4582                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4583                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4584                         </actions>
4585                 </permacrud>
4586         </class>
4587
4588         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4589                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4590                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4591                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4592                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4593                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4594                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4595                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4596                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4597                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4598                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4599                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4600                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4601                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4602                 </fields>
4603                 <links>
4604                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4605                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4606                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4607                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4608                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4609                 </links>
4610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4611                         <actions>
4612                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4613                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4614                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4615                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4616                         </actions>
4617                 </permacrud>
4618         </class>
4619         
4620         <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">
4621                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4622                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4623                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4624                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4625                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4626                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4627                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4628                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4629                 </fields>
4630                 <links>
4631                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4632                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4633                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4634                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4635                 </links>
4636                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4637                         <actions>
4638                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4639                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4640                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4641                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4642                         </actions>
4643                 </permacrud>
4644         </class>
4645         
4646         <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">
4647                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4648                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4649                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4650                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4651                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4652                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4653                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4654                 </fields>
4655                 <links>
4656                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4657                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4658                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4659                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4660                 </links>
4661                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4662                         <actions>
4663                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4664                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4665                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4666                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4667                         </actions>
4668                 </permacrud>
4669         </class>
4670         
4671         <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">
4672                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4673                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4674                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4675                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4676                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4677                 </fields>
4678                 <links>
4679                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4680                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4681                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4682                 </links>
4683                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4684                         <actions>
4685                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4686                     <context link="resource" field="owner" />
4687                 </create>
4688                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4689                     <context link="resource" field="owner" />
4690                 </retrieve>
4691                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4692                     <context link="resource" field="owner" />
4693                 </update>
4694                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4695                     <context link="resource" field="owner" />
4696                 </delete>
4697                         </actions>
4698                 </permacrud>
4699         </class>
4700         
4701         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4702                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4703                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4704                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4705                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4706                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4707                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4708                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4709                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4710                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4711                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4712                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4713                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4714                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4715                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4716                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4717                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4718                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4719                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4720                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4721                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4722                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4723                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4724                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4725                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4726                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4727                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4728                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4729                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4730                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4731                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4732                 </fields>
4733                 <links>
4734                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4735                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4736                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4737                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4738                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4739                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4740                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4741                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4742                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4743                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4744                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4745                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4746                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4747                 </links>
4748                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4749                         <actions>
4750                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4751                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4752                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4753                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4754                         </actions>
4755                 </permacrud>
4756         </class>
4757         
4758         <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">
4759                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4760                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4761                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4762                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4763                 </fields>
4764                 <links>
4765                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4766                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4767                 </links>
4768                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4769                         <actions>
4770                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4771                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4772                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4773                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4774                         </actions>
4775                 </permacrud>
4776         </class>
4777
4778         <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">
4779                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4780                         <field name="bucket" reporter:datatype="link"/>
4781                         <field name="id" reporter:datatype="id" />
4782                         <field name="target_call_number" reporter:datatype="link" />
4783                         <field name="create_time" reporter:datatype="timestamp" />
4784                         <field name="pos" reporter:datatype="int" />
4785                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4786                 </fields>
4787                 <links>
4788                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4789                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4790             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4791                 </links>
4792                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4793                         <actions>
4794                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
4795                     <context link="bucket" owning_lib="owning_lib"/>
4796                 </retrieve>
4797             </actions>
4798         </permacrud>
4799         </class>
4800         <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">
4801                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4802                         <field name="id" reporter:datatype="id" />
4803                         <field name="item" reporter:datatype="link"/>
4804                         <field name="note" reporter:datatype="text" />
4805                 </fields>
4806                 <links>
4807                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4808                 </links>
4809         </class>
4810         <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">
4811                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4812                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4813                         <field name="btype" reporter:datatype="text"/>
4814                         <field name="id" reporter:datatype="id" />
4815                         <field name="name" reporter:datatype="text"/>
4816                         <field name="description" reporter:datatype="text"/>
4817                         <field name="owner" reporter:datatype="link"/>
4818                         <field name="pub" reporter:datatype="bool"/>
4819                         <field name="create_time" reporter:datatype="timestamp" />
4820                         <field name="owning_lib" reporter:datatype="org_unit" />
4821                 </fields>
4822                 <links>
4823                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4824                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4825                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4826                 </links>
4827                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4828                         <actions>
4829                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4830                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4831                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4832                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
4833                         </actions>
4834                 </permacrud>
4835         </class>
4836         <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">
4837                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4838                         <field name="id" reporter:datatype="id" />
4839                         <field name="bucket" reporter:datatype="link"/>
4840                         <field name="note" reporter:datatype="text" />
4841                 </fields>
4842                 <links>
4843                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4844                 </links>
4845         </class>
4846         <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">
4847                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4848                         <field name="hold" reporter:datatype="link"/>
4849                         <field name="id" reporter:datatype="id" />
4850                         <field name="target_copy" reporter:datatype="link"/>
4851                         <field name="proximity" reporter:datatype="number"/>
4852                 </fields>
4853                 <links>
4854                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4855                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4856                 </links>
4857         </class>
4858         <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">
4859                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4860                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4861                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4862                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4863                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4864                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4865                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4866                 </fields>
4867                 <links>
4868                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4869                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4870                 </links>
4871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4872             <actions>
4873                 <create permission="CREATE_HOLD_NOTIFICATION">
4874                                         <context link="hold" jump="usr" field="home_ou" />
4875                                 </create>
4876                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4877                                         <context link="hold" jump="usr" field="home_ou" />
4878                                 </retrieve>
4879                 <update permission="CREATE_HOLD_NOTIFICATION">
4880                                         <context link="hold" jump="usr" field="home_ou" />
4881                                 </update>
4882                 <delete permission="CREATE_HOLD_NOTIFICATION">
4883                                         <context link="hold" jump="usr" field="home_ou" />
4884                                 </delete>
4885             </actions>
4886         </permacrud>
4887         </class>
4888         <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">
4889                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4890                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4891                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4892                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4893                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4894                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4895                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4896                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4897                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4898                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4899                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4900                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4901                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4902                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4903                         <field reporter:label="URL" name="url" reporter:datatype="text" />
4904                 </fields>
4905                 <links>
4906                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4907                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4908                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4909                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4910                 </links>
4911         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4912             <actions>
4913                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4914                 <retrieve/>
4915                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4916                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4917             </actions>
4918         </permacrud>
4919         </class>
4920         <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">
4921                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4922                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4923                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4924                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4925                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4926             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4927             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4928             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4929                 </fields>
4930                 <links>
4931                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4932                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4933                 </links>
4934         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4935             <actions>
4936                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4937                 <retrieve/>
4938                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4939                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4940             </actions>
4941         </permacrud>
4942         </class>
4943         <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">
4944                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4945                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4946             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4947             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4948                 </fields>
4949                 <links>
4950                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4951                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4952                 </links>
4953         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4954             <actions>
4955                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4956                                         <context link="lgroup" field="owner" />
4957                 </create>
4958                 <retrieve/>
4959                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4960                                         <context link="lgroup" field="owner" />
4961                 </update>
4962                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4963                                         <context link="lgroup" field="owner" />
4964                 </delete>
4965             </actions>
4966         </permacrud>
4967         </class>
4968
4969     <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">
4970         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4971             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4972             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4973             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4974             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4975         </fields>
4976         <links>
4977             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4978             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4979         </links>
4980         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4981             <actions>
4982                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4983                 <retrieve/>
4984                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4985                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4986             </actions>
4987         </permacrud>
4988     </class>
4989
4990         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4991                 <fields>
4992                         <field name="sre_id" oils_persist:virtual="true" />
4993                         <field name="location" oils_persist:virtual="true" />
4994                         <field name="owning_lib" oils_persist:virtual="true" />
4995                         <field name="basic_holdings" oils_persist:virtual="true" />
4996                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4997                         <field name="supplement_holdings" oils_persist:virtual="true" />
4998                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4999                         <field name="index_holdings" oils_persist:virtual="true" />
5000                         <field name="index_holdings_add" oils_persist:virtual="true" />
5001                         <field name="online" oils_persist:virtual="true" />
5002                         <field name="missing" oils_persist:virtual="true" />
5003                         <field name="incomplete" oils_persist:virtual="true" />
5004                 </fields>
5005         </class>
5006
5007         <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">
5008                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5009                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5010                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5011                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5012                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5013                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5014                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5015                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5016                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5017                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5018                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5019                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5020                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5021                 </fields>
5022                 <links>
5023                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5024                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5025                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5026                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5027                 </links>
5028                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5029                         <actions>
5030                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5031                                 <retrieve/>
5032                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5033                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5034                         </actions>
5035                 </permacrud>
5036         </class>
5037
5038         <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">
5039                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5040                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5041                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5042                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5043                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5044                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5045                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5046                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5047                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5048                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5049                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5050                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5051                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5052                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5053                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5054                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5055                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5056                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5057                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5058                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5059                 </fields>
5060                 <links>
5061                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5062                 </links>
5063                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5064                         <actions>
5065                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5066                                         <context link="subscription" field="owning_lib" />
5067                                 </create>
5068                                 <retrieve />
5069                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5070                                         <context link="subscription" field="owning_lib" />
5071                                 </update>
5072                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5073                                         <context link="subscription" field="owning_lib" />
5074                                 </delete>
5075                         </actions>
5076                 </permacrud>
5077         </class>
5078
5079         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5080                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5081                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5082                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5083                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5084                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5085                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5086                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5087                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5088                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5089                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5090                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5091                 </fields>
5092                 <links>
5093                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5094                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5095                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5096                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5097                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5098                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5099                 </links>
5100                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5101                         <actions>
5102                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5103                                 <retrieve />
5104                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5105                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5106                         </actions>
5107                 </permacrud>
5108         </class>
5109
5110         <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">
5111                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5112                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5113                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5114                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5115                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5116                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5117                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5118                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5119                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5120                 </fields>
5121                 <links>
5122                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5123                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5124                 </links>
5125                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5126                         <actions>
5127                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5128                     <context link="subscription" field="owning_lib"/>
5129                 </create>
5130                                 <retrieve />
5131                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5132                     <context link="subscription" field="owning_lib"/>
5133                 </update>
5134                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5135                     <context link="subscription" field="owning_lib"/>
5136                 </delete>
5137                         </actions>
5138                 </permacrud>
5139         </class>
5140
5141         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5142                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5143                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5144                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5145                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5146                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5147                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5148                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5149                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5150                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5151                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5152                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5153                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5154                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5155                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5156                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5157                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5158                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5159                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5160                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5161                 </fields>
5162                 <links>
5163                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5164                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5165                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5166                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5167                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5168                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5169                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5170                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5171                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5172                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5173                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5174                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5175                 </links>
5176                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5177                         <actions>
5178                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5179                                 <retrieve />
5180                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5181                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5182                         </actions>
5183                 </permacrud>
5184         </class>
5185
5186         <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">
5187                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5188                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5189                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5190                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5191                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5192                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5193                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5194                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5195                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5196                 </fields>
5197                 <links>
5198                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5199                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5200                 </links>
5201                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5202                         <actions>
5203                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5204                                         <context link="distribution" field="holding_lib" />
5205                                 </create>
5206                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5207                                         <context link="distribution" field="holding_lib" />
5208                                 </retrieve>
5209                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5210                                         <context link="distribution" field="holding_lib" />
5211                                 </update>
5212                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5213                                         <context link="distribution" field="holding_lib" />
5214                                 </delete>
5215                         </actions>
5216                 </permacrud>
5217         </class>
5218
5219         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5220                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5221                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5222                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5223                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5224                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5225                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5226                 </fields>
5227                 <links>
5228                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5229                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5230                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5231                 </links>
5232                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5233                         <actions>
5234                                 <create permission="ADMIN_SERIAL_STREAM">
5235                                         <context link="distribution" field="holding_lib" />
5236                                 </create>
5237                                 <retrieve />
5238                                 <update permission="ADMIN_SERIAL_STREAM">
5239                                         <context link="distribution" field="holding_lib" />
5240                                 </update>
5241                                 <delete permission="ADMIN_SERIAL_STREAM">
5242                                         <context link="distribution" field="holding_lib" />
5243                                 </delete>
5244                         </actions>
5245                 </permacrud>
5246         </class>
5247
5248         <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">
5249                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5250                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5251                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5252                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5253                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5254                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5255                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5256                 </fields>
5257                 <links>
5258                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5259                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5260                 </links>
5261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5262                         <actions>
5263                                 <create permission="ADMIN_SERIAL_STREAM">
5264                                         <context link="stream" jump="distribution" field="holding_lib" />
5265                                 </create>
5266                                 <retrieve permission="RECEIVE_SERIAL">
5267                                         <context link="stream" jump="distribution" field="holding_lib" />
5268                                 </retrieve>
5269                                 <update permission="ADMIN_SERIAL_STREAM">
5270                                         <context link="stream" jump="distribution" field="holding_lib" />
5271                                 </update>
5272                                 <delete permission="ADMIN_SERIAL_STREAM">
5273                                         <context link="stream" jump="distribution" field="holding_lib" />
5274                                 </delete>
5275                         </actions>
5276                 </permacrud>
5277         </class>
5278
5279         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5280                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5281                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5282                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5283                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5284                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5285                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5286                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5287                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5288                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5289                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5290                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5291                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5292                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5293                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5294                 </fields>
5295                 <links>
5296                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5297                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5298                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5299                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5300                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5301                 </links>
5302                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5303                         <actions>
5304                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5305                                         <context link="subscription" field="owning_lib" />
5306                                 </create>
5307                                 <retrieve/>
5308                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5309                                         <context link="subscription" field="owning_lib" />
5310                                 </update>
5311                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5312                                         <context link="subscription" field="owning_lib" />
5313                                 </delete>
5314                         </actions>
5315                 </permacrud>
5316         </class>
5317
5318         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5319                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5320                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5321                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5322                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5323                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5324                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5325                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5326                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5327                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5328                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5329                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5330                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5331                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5332                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5333                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5334                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5335                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5336                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5337                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5338                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5339                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5340                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5341                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5342                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5343                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5344                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5345                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5346                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5347                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5348                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5349                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5350                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5351                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5352                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5353                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5354                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5355                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5356                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5357                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5358                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5359                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5360                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5361                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5362                 </fields>
5363                 <links>
5364                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5365                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5366                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5367                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5368                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5369                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5370                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5371                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5372                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5373                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5374                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5375                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5376                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5377                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5378                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5379                 </links>
5380                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5381                         <actions>
5382                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5383                                 <retrieve/>
5384                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5385                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5386                         </actions>
5387                 </permacrud>
5388         </class>
5389
5390         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5391                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5392                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5393                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5394                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5395                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5396                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5397                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5398                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5399                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5400                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5401                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5402                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5403                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5404                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5405                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5406                 </fields>
5407                 <links>
5408                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5409                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5410                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5411                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5412                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5413                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5414                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5415                 </links>
5416                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5417                         <actions>
5418                                 <create permission="ADMIN_SERIAL_ITEM">
5419                                         <context link="stream" jump="distribution" field="holding_lib" />
5420                                 </create>
5421                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5422                                         <context link="stream" jump="distribution" field="holding_lib" />
5423                                 </retrieve>
5424                                 <update permission="ADMIN_SERIAL_ITEM">
5425                                         <context link="stream" jump="distribution" field="holding_lib" />
5426                                 </update>
5427                                 <delete permission="ADMIN_SERIAL_ITEM">
5428                                         <context link="stream" jump="distribution" field="holding_lib" />
5429                                 </delete>
5430                         </actions>
5431                 </permacrud>
5432         </class>
5433
5434         <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">
5435                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5436                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5437                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5438                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5439                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5440                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5441                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5442                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5443                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5444                 </fields>
5445                 <links>
5446                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5447                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5448                 </links>
5449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5450                         <actions>
5451                                 <create permission="ADMIN_SERIAL_ITEM">
5452                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5453                                 </create>
5454                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5455                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5456                                 </retrieve>
5457                                 <update permission="ADMIN_SERIAL_ITEM">
5458                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5459                                 </update>
5460                                 <delete permission="ADMIN_SERIAL_ITEM">
5461                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5462                                 </delete>
5463                         </actions>
5464                 </permacrud>
5465         </class>
5466         <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">
5467                 <fields>
5468                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5469                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5470                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5471                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5472                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5473                 </fields>
5474                 <links>
5475                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5476                 </links>
5477         </class>
5478         <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">
5479                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5480                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5481                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5482                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5483                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5484                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5485                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5486                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5487                 </fields>
5488                 <links>
5489                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5490                 </links>
5491         </class>
5492         <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">
5493                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5494                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5495                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5496                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5497                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5498                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5499                 </fields>
5500                 <links>
5501                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5502                 </links>
5503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5504                         <actions>
5505                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5506                                         <context link="distribution" field="holding_lib" />
5507                                 </create>
5508                                 <retrieve/>
5509                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5510                                         <context link="distribution" field="holding_lib" />
5511                                 </update>
5512                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5513                                         <context link="distribution" field="holding_lib" />
5514                                 </delete>
5515                         </actions>
5516                 </permacrud>
5517         </class>
5518
5519         <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">
5520                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5521                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5522                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5523                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5524                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5525                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5526                 </fields>
5527                 <links>
5528                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5529                 </links>
5530                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5531                         <actions>
5532                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5533                                         <context link="distribution" field="holding_lib" />
5534                                 </create>
5535                                 <retrieve/>
5536                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5537                                         <context link="distribution" field="holding_lib" />
5538                                 </update>
5539                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5540                                         <context link="distribution" field="holding_lib" />
5541                                 </delete>
5542                         </actions>
5543                 </permacrud>
5544         </class>
5545
5546         <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">
5547                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5548                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5549                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5550                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5551                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5552                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5553                 </fields>
5554                 <links>
5555                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5556                 </links>
5557                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5558                         <actions>
5559                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5560                                         <context link="distribution" field="holding_lib" />
5561                                 </create>
5562                                 <retrieve/>
5563                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5564                                         <context link="distribution" field="holding_lib" />
5565                                 </update>
5566                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5567                                         <context link="distribution" field="holding_lib" />
5568                                 </delete>
5569                         </actions>
5570                 </permacrud>
5571         </class>
5572
5573         <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">
5574                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
5575                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5576                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5577                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
5578                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
5579                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
5580                 </fields>
5581                 <links>
5582                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5583                 </links>
5584                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5585                         <actions>
5586                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5587                                 <retrieve/>
5588                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5589                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
5590                         </actions>
5591                 </permacrud>
5592         </class>
5593
5594         <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">
5595                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5596                         <field name="id" reporter:datatype="id" />
5597                         <field name="owning_copy" reporter:datatype="link"/>
5598                         <field name="stat_cat" reporter:datatype="link"/>
5599                         <field name="stat_cat_entry" reporter:datatype="link"/>
5600                 </fields>
5601                 <links>
5602                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5603                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5604                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5605                 </links>
5606                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5607                         <actions>
5608                                 <retrieve/>
5609                         </actions>
5610                 </permacrud>
5611         </class>
5612         <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">
5613                 <fields oils_persist:primary="code">
5614                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5615                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5616                 </fields>
5617                 <links/>
5618         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5619             <actions>
5620                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5621                 <retrieve/>
5622                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5623                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5624             </actions>
5625         </permacrud>
5626         </class>
5627         <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">
5628                 <fields oils_persist:primary="code">
5629                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5630                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5631                 </fields>
5632                 <links/>
5633         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5634             <actions>
5635                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5636                 <retrieve/>
5637                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5638                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5639             </actions>
5640         </permacrud>
5641         </class>
5642         <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">
5643                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5644                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5645                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5646                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5647                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5648                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5649                 </fields>
5650                 <links>
5651             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5652         </links>
5653         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5654             <actions>
5655                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5656                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5657                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5658                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5659             </actions>
5660         </permacrud>
5661         </class>
5662         <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">
5663                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5664                         <field name="id" reporter:datatype="id" />
5665                         <field name="name" reporter:datatype="text"/>
5666                 </fields>
5667                 <links/>
5668         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5669             <actions>
5670                 <create permission="CREATE_LASSO" global_required="true"/>
5671                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5672                 <update permission="UPDATE_LASSO" global_required="true"/>
5673                 <delete permission="DELETE_LASSO" global_required="true"/>
5674             </actions>
5675         </permacrud>
5676         </class>
5677         <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">
5678                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5679                         <field name="id" reporter:datatype="id" />
5680                         <field name="lasso" reporter:datatype="link"/>
5681                         <field name="org_unit" reporter:datatype="org_unit"/>
5682                 </fields>
5683                 <links>
5684                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5685                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5686                 </links>
5687         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5688             <actions>
5689                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5690                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5691                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5692                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5693             </actions>
5694         </permacrud>
5695         </class>
5696         <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">
5697                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5698                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5699                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5700                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5701                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5702                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5703                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5704                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5705                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5706                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5707                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5708                 </fields>
5709                 <links>
5710                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5711                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5712                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5713                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5714                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5715                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5716                 </links>
5717         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5718             <actions>
5719                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5720                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5721                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5722                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5723             </actions>
5724         </permacrud>
5725         </class>
5726         <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">
5727                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5728                         <field name="id" reporter:datatype="id" />
5729                         <field name="from_org" reporter:datatype="org_unit"/>
5730                         <field name="to_org" reporter:datatype="org_unit"/>
5731                         <field name="prox" reporter:datatype="int" />
5732                 </fields>
5733                 <links>
5734                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5735                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5736                 </links>
5737         </class>
5738         <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">
5739                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5740                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5741                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5742                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5743                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5744                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5745                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5746                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5747                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5748                 </fields>
5749                 <links/>
5750         </class>
5751         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5752                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5753                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5754                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5755                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5756                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5757                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5758                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5759                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5760                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5761                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5762                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5763                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5764                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5765                 </fields>
5766                 <links>
5767                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5768                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5769                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5770                 </links>
5771         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5772             <actions>
5773                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5774                 <retrieve/>
5775                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5776                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5777             </actions>
5778         </permacrud>
5779         </class>
5780         <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">
5781                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5782                         <field name="address_type"  reporter:datatype="text"/>
5783                         <field name="city"  reporter:datatype="text"/>
5784                         <field name="country"  reporter:datatype="text"/>
5785                         <field name="county"  reporter:datatype="text"/>
5786                         <field name="id" reporter:datatype="id" />
5787                         <field name="org_unit" reporter:datatype="org_unit"/>
5788                         <field name="post_code"  reporter:datatype="text"/>
5789                         <field name="state"  reporter:datatype="text"/>
5790                         <field name="street1"  reporter:datatype="text"/>
5791                         <field name="street2"  reporter:datatype="text"/>
5792                         <field name="valid" reporter:datatype="bool"/>
5793                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5794                 </fields>
5795                 <links>
5796                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5797                 </links>
5798         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5799             <actions>
5800                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5801                 <retrieve/>
5802                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5803                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5804             </actions>
5805         </permacrud>
5806         </class>
5807         <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">
5808                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5809                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5810                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5811                         <field name="query_text" reporter:datatype="text"/>
5812                 </fields>
5813         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5814             <actions>
5815                 <retrieve/>
5816             </actions>
5817         </permacrud>
5818         </class>
5819
5820         <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">
5821                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5822                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5823                         <field name="owner" reporter:datatype="org_unit"/>
5824                         <field name="code" reporter:datatype="text"/>
5825                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5826                         <field name="create_date" reporter:datatype="timestamp"/>
5827                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5828                 </fields>
5829                 <links>
5830                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5831                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5832                 </links>
5833         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5834             <actions>
5835                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5836                 <retrieve/>
5837                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5838                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5839             </actions>
5840         </permacrud>
5841         </class>
5842         <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">
5843                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5844                         <field name="id" reporter:datatype="id"/>
5845                         <field name="grp" reporter:datatype="link"/>
5846                         <field name="pos" reporter:datatype="int"/>
5847                         <field name="query" reporter:datatype="link"/>
5848                 </fields>
5849                 <links>
5850                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5851                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5852                 </links>
5853         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5854             <actions>
5855                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5856                     <context link="grp" field="owner"/>
5857                 </create>
5858                 <retrieve/>
5859                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5860                     <context link="grp" field="owner"/>
5861                 </update>
5862                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5863                     <context link="grp" field="owner"/>
5864                 </delete>
5865             </actions>
5866         </permacrud>
5867         </class>
5868
5869         <!-- A note: Please update alhr and ahopl when updating ahr -->
5870         <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">
5871                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5872                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5873                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5874                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5875                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
5876                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5877                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5878                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5879                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5880                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5881                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5882                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5883                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5884                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5885                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5886                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5887                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5888                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5889                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5890                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5891                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5892                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5893                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5894                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5895                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5896                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5897                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5898                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5899                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5900                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5901                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5902                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5903                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5904                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5905                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5906                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5907                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5908                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5909                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5910                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5911                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5912                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5913                 </fields>
5914                 <links>
5915                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5916                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5917                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5918                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5919                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5920                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5921                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5922                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5923                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5924                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5925                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5926                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5927                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5928                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5929                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5930                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5931                 </links>
5932                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5933                         <actions>
5934                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5935                         </actions>
5936                 </permacrud>
5937         </class>
5938         <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">
5939                 <oils_persist:source_definition><![CDATA[
5940                 SELECT
5941                         ahr.*,
5942                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5943                                 copy_location_order_position,
5944                         CASE WHEN au.alias IS NOT NULL THEN
5945                                 au.alias
5946                         ELSE
5947                                 au.first_given_name
5948                         END AS usr_alias_or_first_given_name,
5949                         au.first_given_name AS usr_first_given_name,
5950                         au.second_given_name AS usr_second_given_name,
5951                         au.family_name AS usr_family_name,
5952                         au.prefix AS usr_prefix,
5953                         au.suffix AS usr_suffix,
5954                         au.alias AS usr_alias,
5955                         CASE WHEN au.alias IS NOT NULL THEN
5956                                 au.alias
5957                         ELSE
5958                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5959                                         COALESCE(au.family_name, ''),
5960                                         COALESCE(au.suffix, ''),
5961                                         ', ',
5962                                         COALESCE(au.prefix, ''),
5963                                         COALESCE(au.first_given_name, ''),
5964                                         COALESCE(au.second_given_name, '')
5965                                 ], ' '), E'\\s+,', ',')
5966                         END AS usr_alias_or_display_name,
5967                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5968                                 COALESCE(au.family_name, ''),
5969                                 COALESCE(au.suffix, ''),
5970                                 ', ',
5971                                 COALESCE(au.prefix, ''),
5972                                 COALESCE(au.first_given_name, ''),
5973                                 COALESCE(au.second_given_name, '')
5974                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5975                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5976                                 AS call_number_label,
5977                         siss.label AS issuance_label,
5978                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5979                         ahcm_1.copy_count AS potential_copies
5980                 FROM action.hold_request ahr
5981                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5982                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5983                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5984                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5985                 JOIN actor.usr au ON (au.id = ahr.usr)
5986                 JOIN (
5987                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5988                         FROM asset.copy_location
5989                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5990                 LEFT JOIN actor.usr_standing_penalty ausp 
5991                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5992                 LEFT JOIN config.standing_penalty csp
5993                         ON (
5994                                 csp.id = ausp.standing_penalty AND 
5995                                 csp.block_list LIKE '%CAPTURE%' AND (
5996                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5997                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5998                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5999                                         )
6000                                 )
6001                         )
6002                 JOIN (
6003                         SELECT COUNT(target_copy) AS copy_count, hold
6004                         FROM action.hold_copy_map
6005                         GROUP BY 2
6006                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6007                 LEFT JOIN serial.issuance siss
6008                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6009                 LEFT JOIN asset.copy_location_order acplo
6010                         ON (acp.location = acplo.location AND
6011                                 acp.circ_lib = acplo.org)
6012                 WHERE
6013                         ahr.capture_time IS NULL AND
6014                         ahr.cancel_time IS NULL AND
6015                         csp.id IS NULL AND
6016                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6017                         acp.status IN (0,7)
6018                 ]]></oils_persist:source_definition>
6019                 <fields oils_persist:primary="id">
6020                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6021                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6022                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6023                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6024                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6025                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6026                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6027                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6028                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6029                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6030                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6031                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6032                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6033                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6034                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6035                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6036                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6037                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6038                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6039                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6040                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6041                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6042                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6043                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6044                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6045                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6046                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6047                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6048                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6049                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6050                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6051                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6052                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6053                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6054                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6055                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6056                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6057                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6058                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6059                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6060                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6061                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6062                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6063                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6064                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6065                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6066                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6067                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6068                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6069                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6070                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6071                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6072                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6073                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6074                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6075                 </fields>
6076                 <links>
6077                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6078                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6079                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6080                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6081                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6082                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6083                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6084                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6085                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6086                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6087                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6088                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6089                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6090                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6091                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6092                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6093                 </links>
6094                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6095                         <actions>
6096                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6097                         </actions>
6098                 </permacrud>
6099         </class>
6100         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6101                 <oils_persist:source_definition>
6102                         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)
6103                 </oils_persist:source_definition>
6104                 <fields oils_persist:primary="id">
6105                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6106                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6107                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6108                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6109                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6110                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6111                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6112                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6113                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6114                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6115                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6116                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6117                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6118                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6119                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6120                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6121                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6122                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6123                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6124                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6125                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6126                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6127                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6128                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6129                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6130                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6131                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6132                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6133                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6134                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6135                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6136                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6137                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6138                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6139                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6140                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6141                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6142                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6143                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6144                 </fields>
6145                 <links>
6146                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6147                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6148                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6149                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6150                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6151                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6152                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6153                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6154                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6155                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6156                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6157                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6158                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6159                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6160                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6161                 </links>
6162         </class>
6163
6164         <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">
6165                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6166                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6167                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6168                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6169                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6170                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6171                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6172                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6173                 </fields>
6174                 <links>
6175                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6176                 </links>
6177                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6178                         <actions>
6179                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6180                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6181                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6182                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6183                         </actions>
6184                 </permacrud>
6185         </class>
6186         <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">
6187                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6188                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6189                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6190                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6191                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6192                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6193                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6194                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6195                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6196                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6197                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6198                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6199                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6200                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6201                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6202                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6203                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6204                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6205                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6206                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6207                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6208                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6209                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6210                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6211                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6212                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6213                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6214                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6215                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6216                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6217                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6218                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6219                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6220                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6221                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6222                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6223                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6224                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6225                 </fields>
6226                 <links>
6227                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6228                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6229                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6230                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6231                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6232                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6233                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6234                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6235                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6236                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6237                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6238                 </links>
6239                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6240                         <actions>
6241                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6242                         </actions>
6243                 </permacrud>
6244         </class>
6245         <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">
6246                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6247                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6248                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6249                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6250                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6251                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6252                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6253                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6254                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6255                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6256                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6257                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6258                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6259                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6260                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6261                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6262                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6263                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6264                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6265                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6266                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6267                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6268                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6269                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6270                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6271                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6272                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6273                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6274                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6275                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6276                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6277                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6278                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6279                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6280                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6281                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6282                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6283                 </fields>
6284                 <links>
6285                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6286                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6287                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6288                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6289                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6290                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6291                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6292                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6293                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6294                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6295                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6296                 </links>
6297                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6298                         <actions>
6299                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6300                         </actions>
6301                 </permacrud>
6302         </class>
6303
6304         <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">
6305                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6306                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6307                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6308                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6309                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6310                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6311                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6312                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6313                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
6314                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6315                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6316                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6317                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6318                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6319                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
6320                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6321                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6322                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6323                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6324                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6325                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6326                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6327                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6328                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6329                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6330                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6331                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6332                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6333                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6334                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6335                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6336                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6337                 </fields>
6338                 <links>
6339                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6340                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6341                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6342                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6343                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6344                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6345                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6346                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6347                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6348                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6349                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6350                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6351                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6352                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6353                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6354                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6355                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6356                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6357                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6358                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6359                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6360                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6361                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6362                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6363                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6364                 </links>
6365         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6366             <actions>
6367                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6368                 <retrieve />
6369                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6370                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6371             </actions>
6372         </permacrud>
6373         </class>
6374         <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">
6375                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6376                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6377                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6378                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6379                 </fields>
6380                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6381                         <actions>
6382                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6383                                 <retrieve/>
6384                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6385                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6386                         </actions>
6387                 </permacrud>
6388         </class>
6389         <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">
6390                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6391                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6392                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6393                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6394                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6395                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6396                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6397                 </fields>
6398                 <links>
6399                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6400                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6401                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6402                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6403                 </links>
6404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6405                         <actions>
6406                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6407                                 <retrieve/>
6408                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6409                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6410                         </actions>
6411                 </permacrud>
6412         </class>
6413         <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">
6414                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6415                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6416                         <field name="btype" reporter:datatype="text"/>
6417                         <field name="id" reporter:datatype="id" />
6418                         <field name="name"  reporter:datatype="text"/>
6419                         <field name="description" reporter:datatype="text"/>
6420                         <field name="owner" reporter:datatype="link"/>
6421                         <field name="pub" reporter:datatype="bool"/>
6422                         <field name="create_time" reporter:datatype="timestamp" />
6423                         <field name="owning_lib" reporter:datatype="org_unit" />
6424                 </fields>
6425                 <links>
6426                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6427                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6428                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6429                 </links>
6430                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6431                         <actions>
6432                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6433                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6434                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6435                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6436                         </actions>
6437                 </permacrud>
6438         </class>
6439         <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">
6440                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6441                         <field name="id" reporter:datatype="id" />
6442                         <field name="bucket" reporter:datatype="link"/>
6443                         <field name="note" reporter:datatype="text" />
6444                 </fields>
6445                 <links>
6446                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6447                 </links>
6448         </class>
6449         <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">
6450                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6451                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6452                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6453                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6454                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6455                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6456                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6457                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6458                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6459                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6460                 </fields>
6461                 <links>
6462                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6463                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6464                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6465                 </links>
6466                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6467                         <actions>
6468                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6469                         </actions>
6470                 </permacrud>
6471         </class>
6472         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6473                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6474                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6475                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6476                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6477                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6478                 </fields>
6479                 <links>
6480                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6481                 </links>
6482                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6483                         <actions>
6484                                 <retrieve permission="VIEW_USER">
6485                                         <context link="usr" field="home_ou" />
6486                                 </retrieve>
6487                         </actions>
6488                 </permacrud>
6489         </class>
6490     <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">
6491         <fields oils_persist:primary="field">
6492             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6493             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6494             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6495         </fields>
6496         <links/>
6497         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6498             <actions>
6499                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6500                 <retrieve />
6501                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6502                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6503             </actions>
6504         </permacrud>
6505     </class>
6506         <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">
6507                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6508                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6509                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6510                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6511                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6512                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6513                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6514                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6515                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6516                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6517                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6518                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6519                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6520                 </fields>
6521                 <links>
6522                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6523                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6524                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6525                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6526                 </links>
6527         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6528             <actions>
6529                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6530                 <retrieve />
6531                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6532                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6533             </actions>
6534         </permacrud>
6535         </class>
6536         <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">
6537                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6538                         <field name="field" reporter:datatype="link"/>
6539                         <field name="id" reporter:datatype="id" />
6540                         <field name="source" reporter:datatype="link"/>
6541                         <field name="value"  reporter:datatype="text"/>
6542                 </fields>
6543                 <links>
6544                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6545                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6546                 </links>
6547         </class>
6548         <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">
6549                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6550                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6551                         <field name="btype" reporter:datatype="text"/>
6552                         <field name="id" reporter:datatype="id" />
6553                         <field name="name"  reporter:datatype="text"/>
6554                         <field name="description" reporter:datatype="text"/>
6555                         <field name="owner" reporter:datatype="link"/>
6556                         <field name="pub" reporter:datatype="bool"/>
6557                         <field name="create_time" reporter:datatype="timestamp" />
6558                         <field name="owning_lib" reporter:datatype="org_unit" />
6559                 </fields>
6560                 <links>
6561                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6562                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6563                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6564                 </links>
6565                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6566                         <actions>
6567                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6568                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6569                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6570                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
6571                         </actions>
6572                 </permacrud>
6573         </class>
6574         <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">
6575                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6576                         <field name="id" reporter:datatype="id" />
6577                         <field name="bucket" reporter:datatype="link"/>
6578                         <field name="note" reporter:datatype="text" />
6579                 </fields>
6580                 <links>
6581                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6582                 </links>
6583         </class>
6584         <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">
6585                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6586                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6587                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6588                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6589                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6590                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6591                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6592                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6593                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6594                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6595                 </fields>
6596                 <links>
6597                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6598                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6599                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6600                 </links>
6601         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6602             <actions>
6603                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6604                     <context link="xact" jump="usr" field="home_ou"/>
6605                 </retrieve>
6606                         </actions>
6607                 </permacrud>
6608         </class>
6609         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6610                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6611                         <field name="id" reporter:datatype="id" />
6612                         <field name="ind1" />
6613                         <field name="ind2" />
6614                         <field name="record" />
6615                         <field name="subfield" />
6616                         <field name="tag" />
6617                         <field name="value" />
6618                 </fields>
6619                 <links>
6620                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6621                 </links>
6622         </class>
6623         <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">
6624                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6625                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6626                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6627                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6628                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6629                 </fields>
6630                 <links>
6631                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6632                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6633                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6634                 </links>
6635         </class>
6636         <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">
6637                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6638                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6639                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6640                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6641                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6642                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6643                 </fields>
6644                 <links>
6645                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6646                 </links>
6647         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6648             <actions>
6649                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6650                 <retrieve/>
6651                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6652                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6653             </actions>
6654         </permacrud>
6655
6656         </class>
6657         <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">
6658                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6659                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6660                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6661                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6662                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6663                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6664                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6665                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6666                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6667                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6668                 </fields>
6669                 <links>
6670                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6671                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6672                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6673                 </links>
6674         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6675             <actions>
6676                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6677                 <retrieve/>
6678                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6679                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6680             </actions>
6681         </permacrud>
6682         </class>
6683         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6684                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6685                         <field name="create_date" reporter:datatype="timestamp"/>
6686                         <field name="creator" reporter:datatype="link"/>
6687                         <field name="edit_date" reporter:datatype="timestamp"/>
6688                         <field name="editor" reporter:datatype="link"/>
6689                         <field name="id" reporter:datatype="id" />
6690                         <field name="pub" reporter:datatype="bool"/>
6691                         <field name="record" reporter:datatype="link"/>
6692                         <field name="value"  reporter:datatype="text"/>
6693                 </fields>
6694                 <links>
6695                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6696                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6697                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6698                 </links>
6699         </class>
6700         <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">
6701                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6702                         <field name="balance_owed" reporter:datatype="money" />
6703                         <field name="total_owed" reporter:datatype="money" />
6704                         <field name="total_paid" reporter:datatype="money" />
6705                         <field name="usr" reporter:datatype="link"/>
6706                 </fields>
6707                 <links>
6708                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6709                 </links>
6710         </class>
6711     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6712                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6713                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6714                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6715                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6716                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6717                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6718                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6719                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6720                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6721                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6722                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6723                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6724                 </fields>
6725                 <links>
6726                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6727                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6728                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6729                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6730                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6731                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6732                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6733                 </links>
6734         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6735             <actions>
6736                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
6737             </actions>
6738         </permacrud>
6739         </class>
6740         <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">
6741                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6742                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6743                         <field name="quality" reporter:datatype="int" />
6744                         <field name="source" reporter:datatype="text"/>
6745                         <field name="transcendant" reporter:datatype="bool"/>
6746                         <field name="can_have_copies" reporter:datatype="bool"/>
6747                 </fields>
6748                 <links/>
6749         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6750             <actions>
6751                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6752                 <retrieve/>
6753                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6754                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6755             </actions>
6756         </permacrud>
6757         </class>
6758         <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">
6759                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6760                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6761                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6762                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6763                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6764                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6765                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6766                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6767                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6768                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6769                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6770                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6771                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6772                 </fields>
6773                 <links>
6774                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6775                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6776                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6777                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6778                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6779                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6780                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6781                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6782                 </links>
6783                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6784                         <actions>
6785                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6786                                         <context link="usr" field="home_ou" />
6787                                 </retrieve>
6788                         </actions>
6789                 </permacrud>
6790         </class>
6791         <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">
6792                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6793                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6794                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6795                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6796                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6797                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6798                 </fields>
6799                 <links>
6800                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6801                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6802                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6803                 </links>
6804         </class>
6805         <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">
6806                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6807                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6808                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6809                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6810                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6811                 </fields>
6812                 <links>
6813                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6814                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6815                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6816                 </links>
6817         </class>
6818         <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">
6819                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6820                         <field name="bucket" reporter:datatype="link"/>
6821                         <field name="id" reporter:datatype="id" />
6822                         <field name="target_user" reporter:datatype="link"/>
6823                         <field name="create_time" reporter:datatype="timestamp" />
6824                         <field name="pos" reporter:datatype="int" />
6825                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6826                 </fields>
6827                 <links>
6828                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6829                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6830             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6831                 </links>
6832                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6833                         <actions>
6834                                 <retrieve permission="ADMIN_USER_BUCKET">
6835                     <context link="bucket" owning_lib="owning_lib"/>
6836                 </retrieve>
6837             </actions>
6838         </permacrud>
6839         </class>
6840         <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">
6841                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6842                         <field name="id" reporter:datatype="id" />
6843                         <field name="item" reporter:datatype="link"/>
6844                         <field name="note" reporter:datatype="text" />
6845                 </fields>
6846                 <links>
6847                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6848                 </links>
6849         </class>
6850         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6851                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6852                         <field name="balance_owed" reporter:datatype="money" />
6853                         <field name="total_owed" reporter:datatype="money" />
6854                         <field name="total_paid" reporter:datatype="money" />
6855                         <field name="usr" reporter:datatype="link"/>
6856                 </fields>
6857                 <links>
6858                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6859                 </links>
6860         </class>
6861         <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">
6862                 <fields oils_persist:primary="code" oils_persist:sequence="">
6863                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6864                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6865                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6866                 </fields>
6867                 <links/>
6868         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6869             <actions>
6870                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6871                 <retrieve/>
6872                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6873                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6874             </actions>
6875         </permacrud>
6876         </class>
6877         <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">
6878                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6879                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6880                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6881                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6882                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6883                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6884                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6885                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6886                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6887                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6888                 </fields>
6889                 <links>
6890                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6891                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6892                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6893                 </links>
6894         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6895             <actions>
6896                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6897                     <context link="xact" jump="usr" field="home_ou"/>
6898                 </retrieve>
6899                         </actions>
6900                 </permacrud>
6901         </class>
6902         <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">
6903                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6904                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6905                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6906                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6907                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6908                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6909                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6910                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6911                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6912                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6913                 </fields>
6914                 <links>
6915                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6916                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6917                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6918                 </links>
6919         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6920             <actions>
6921                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6922                     <context link="xact" jump="usr" field="home_ou"/>
6923                 </retrieve>
6924                         </actions>
6925                 </permacrud>
6926         </class>
6927         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6928                 <fields oils_persist:primary="id" oils_persist:sequence="">
6929                         <field name="checkin_lib" reporter:datatype="link"/>
6930                         <field name="checkin_staff" reporter:datatype="link"/>
6931                         <field name="checkin_time" reporter:datatype="timestamp"/>
6932                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6933                         <field name="circ_staff" reporter:datatype="link"/>
6934                         <field name="desk_renewal" reporter:datatype="bool"/>
6935                         <field name="due_date" reporter:datatype="timestamp"/>
6936                         <field name="duration" reporter:datatype="interval"/>
6937                         <field name="duration_rule" reporter:datatype="link"/>
6938                         <field name="fine_interval" reporter:datatype="interval"/>
6939                         <field name="id" reporter:datatype="id" />
6940                         <field name="max_fine" reporter:datatype="money" />
6941                         <field name="max_fine_rule" reporter:datatype="link"/>
6942                         <field name="opac_renewal" reporter:datatype="bool"/>
6943                         <field name="phone_renewal" reporter:datatype="bool"/>
6944                         <field name="recurring_fine" reporter:datatype="money" />
6945                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6946                         <field name="renewal_remaining" reporter:datatype="int" />
6947             <field name="grace_period" reporter:datatype="interval" />
6948                         <field name="stop_fines" reporter:datatype="text"/>
6949                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6950                         <field name="target_copy" reporter:datatype="link"/>
6951                         <field name="usr" reporter:datatype="link"/>
6952                         <field name="xact_finish" reporter:datatype="timestamp" />
6953                         <field name="xact_start" reporter:datatype="timestamp" />
6954                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6955                 </fields>
6956                 <links>
6957                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6958                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6959                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6960                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6961                 </links>
6962         </class>
6963         <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">
6964                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6965                         <field name="field" reporter:datatype="link"/>
6966                         <field name="id" reporter:datatype="id" />
6967                         <field name="source" reporter:datatype="link"/>
6968                         <field name="value" reporter:datatype="text"/>
6969                 </fields>
6970                 <links>
6971                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6972                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6973                 </links>
6974         </class>
6975         <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">
6976                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6977                         <field name="high" reporter:datatype="money" />
6978                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6979                         <field name="low" reporter:datatype="money" />
6980                         <field name="name" reporter:datatype="text"/>
6981                         <field name="normal" reporter:datatype="money" />
6982                         <field name="recurrence_interval" reporter:datatype="interval"/>
6983             <field name="grace_period" reporter:datatype="interval" />
6984                 </fields>
6985                 <links/>
6986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6987             <actions>
6988                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6989                 <retrieve/>
6990                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6991                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6992             </actions>
6993         </permacrud>
6994         </class>
6995         <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">
6996                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6997                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6998                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6999                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7000                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7001                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7002                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7003                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7004                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7005                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7006                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7007                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7008                 </fields>
7009                 <links>
7010                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7011                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7012                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7013                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7014                 </links>
7015         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7016             <actions>
7017                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7018                     <context link="xact" jump="usr" field="home_ou"/>
7019                 </retrieve>
7020                         </actions>
7021                 </permacrud>
7022         </class>
7023         <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">
7024                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7025                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7026                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7027                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7028                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7029                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
7030                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7031                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7032                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7033                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7034                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7035                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7036                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7037                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7038                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7039                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7040                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7041                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7042                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7043                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7044                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7045                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7046                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7047                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
7048                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7049                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7050                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7051                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7052                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7053                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7054                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7055                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7056                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7057                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7058                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7059                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7060                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7061                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7062                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7063                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7064                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7065                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7066                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7067                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7068                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7069                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7070                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7071                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7072                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7073                 </fields>
7074                 <links>
7075                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7076                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7077                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7078                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7079                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7080                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7081                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7082                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7083                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7084                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7085                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7086                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7087                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7088                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7089                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7090                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7091                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7092                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7093                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7094                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7095                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7096                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7097                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7098                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7099                 </links>
7100         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7101             <actions>
7102                 <create permission="CREATE_COPY">
7103                     <context link="call_number" field="owning_lib"/>
7104                 </create>
7105                 <retrieve/>
7106                 <update permission="UPDATE_COPY">
7107                     <context link="call_number" field="owning_lib"/>
7108                 </update>
7109                 <delete permission="DELETE_COPY">
7110                     <context link="call_number" field="owning_lib"/>
7111                 </delete>
7112             </actions>
7113         </permacrud>
7114         </class>
7115
7116         <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">
7117                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
7118                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
7119                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
7120                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7121                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7122                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7123                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7124                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7125                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
7126                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
7127                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7128                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7129                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7130                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
7131                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
7132                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
7133                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
7134                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
7135                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
7136                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
7137                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
7138                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
7139                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7140                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7141                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7142                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7143                 </fields>
7144                 <links>
7145                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7146                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7147                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7148                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7149                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7150                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7151                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7152                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7153                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7154                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7155                 </links>
7156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7157                         <actions>
7158                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7159                                 <retrieve />
7160                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7161                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7162                         </actions>
7163                 </permacrud>
7164         </class>
7165
7166         <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">
7167                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7168                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7169                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7170                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7171                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7172                 </fields>
7173                 <links/>
7174         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7175             <actions>
7176                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7177                 <retrieve/>
7178                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7179                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7180             </actions>
7181         </permacrud>
7182         </class>
7183         <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">
7184                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7185                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7186                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7187                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7188                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7189                 </fields>
7190                 <links/>
7191         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7192             <actions>
7193                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7194                 <retrieve/>
7195                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7196                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7197             </actions>
7198         </permacrud>
7199         </class>
7200         <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">
7201                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7202                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7203                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7204                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7205                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7206                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7207                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7208                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7209                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7210                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7211                 </fields>
7212                 <links>
7213                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7214                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7215                 </links>
7216         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7217             <actions>
7218                 <create permission="CREATE_PERM" global_required="true"/>
7219                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7220                 <update permission="UPDATE_PERM" global_required="true"/>
7221                 <delete permission="DELETE_PERM" global_required="true"/>
7222             </actions>
7223         </permacrud>
7224         </class>
7225         <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">
7226                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7227                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7228                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7229                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7230                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7231                 </fields>
7232                 <links>
7233                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7234                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7235                 </links>
7236         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7237             <actions>
7238                 <create permission="ADMIN_SURVEY">
7239                     <context link="question" jump="survey" field="owner"/>
7240                 </create>
7241                 <retrieve/>
7242                 <update permission="ADMIN_SURVEY">
7243                     <context link="question" jump="survey" field="owner"/>
7244                 </update>
7245                 <delete permission="ADMIN_SURVEY">
7246                     <context link="question" jump="survey" field="owner"/>
7247                 </delete>
7248             </actions>
7249         </permacrud>
7250         </class>
7251         <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">
7252                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7253                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7254                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7255                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7256                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7257                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7258                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7259                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7260                 </fields>
7261                 <links>
7262                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7263                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7264                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7265                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7266                 </links>
7267                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7268                         <actions>
7269                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7270                         </actions>
7271                 </permacrud>
7272         </class>
7273         <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">
7274                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7275                         <field name="balance_owed" reporter:datatype="money" />
7276                         <field name="total_owed" reporter:datatype="money" />
7277                         <field name="total_paid" reporter:datatype="money" />
7278                         <field name="usr" reporter:datatype="link"/>
7279                 </fields>
7280                 <links>
7281                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7282                 </links>
7283         </class>
7284         <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">
7285                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7286                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7287                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7288                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7289                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7290                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7291                 </fields>
7292                 <links>
7293                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7294                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7295                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7296                 </links>
7297         </class>
7298         <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">
7299                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7300                         <field name="field" reporter:datatype="link"/>
7301                         <field name="id" reporter:datatype="id" />
7302                         <field name="source" reporter:datatype="link"/>
7303                         <field name="value" reporter:datatype="text"/>
7304                 </fields>
7305                 <links>
7306                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7307                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7308                 </links>
7309         </class>
7310         <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">
7311                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7312                         <field name="field" reporter:datatype="link"/>
7313                         <field name="id" reporter:datatype="id" />
7314                         <field name="source" reporter:datatype="link"/>
7315                         <field name="value" reporter:datatype="text"/>
7316                 </fields>
7317                 <links>
7318                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7319                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7320                 </links>
7321         </class>
7322         <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">
7323                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7324                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7325                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7326                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7327                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7328                 </fields>
7329                 <links>
7330                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7331                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7332                 </links>
7333         </class>
7334         <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">
7335                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7336                         <field name="depth" reporter:datatype="int" />
7337                         <field name="grantable" reporter:datatype="bool"/>
7338                         <field name="grp" reporter:datatype="link"/>
7339                         <field name="id" reporter:datatype="id" />
7340                         <field name="perm" reporter:datatype="link"/>
7341                 </fields>
7342                 <links>
7343                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7344                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7345                 </links>
7346         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7347             <actions>
7348                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7349                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7350                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7351                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7352             </actions>
7353         </permacrud>
7354         </class>
7355         <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">
7356                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
7357                         <field name="items" oils_persist:virtual="true" />
7358                         <field name="btype" reporter:datatype="text"/>
7359                         <field name="id" reporter:datatype="id" />
7360                         <field name="name" reporter:datatype="text"/>
7361                         <field name="description" reporter:datatype="text"/>
7362                         <field name="owner" reporter:datatype="link"/>
7363                         <field name="pub" reporter:datatype="bool"/>
7364                         <field name="create_time" reporter:datatype="timestamp" />
7365                         <field name="owning_lib" reporter:datatype="org_unit" />
7366                 </fields>
7367                 <links>
7368                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7369                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7370                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7371                 </links>
7372                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7373                         <actions>
7374                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7375                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7376                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7377                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
7378                         </actions>
7379                 </permacrud>
7380         </class>
7381         <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">
7382                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7383                         <field name="id" reporter:datatype="id" />
7384                         <field name="bucket" reporter:datatype="link"/>
7385                         <field name="note" reporter:datatype="text" />
7386                 </fields>
7387                 <links>
7388                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7389                 </links>
7390         </class>
7391         <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">
7392                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7393                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
7394                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7395                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
7396                 </fields>
7397                 <links>
7398                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7399                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7400                 </links>
7401         </class>
7402         <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">
7403                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7404                         <field name="depth" reporter:datatype="int"/>
7405                         <field name="grantable" reporter:datatype="bool"/>
7406                         <field name="id" reporter:datatype="id" />
7407                         <field name="perm" reporter:datatype="link"/>
7408                         <field name="usr" reporter:datatype="link"/>
7409                 </fields>
7410                 <links>
7411                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7412                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7413                 </links>
7414         </class>
7415         <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">
7416                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7417                         <field name="object_id" reporter:datatype="text"/>
7418                         <field name="grantable" reporter:datatype="bool"/>
7419                         <field name="id" reporter:datatype="id" />
7420                         <field name="perm" reporter:datatype="link"/>
7421                         <field name="usr" reporter:datatype="link"/>
7422                         <field name="object_type" reporter:datatype="text"/>
7423                 </fields>
7424                 <links>
7425                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7426                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7427                 </links>
7428         </class>
7429         <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">
7430                 <fields oils_persist:primary="id" oils_persist:sequence="">
7431                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7432                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7433                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7434                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7435                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7436                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7437                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7438                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7439                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7440                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7441                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7442                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7443                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7444                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7445                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7446                 </fields>
7447                 <links>
7448                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7449                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7450                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7451                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7452                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7453                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7454                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7455                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7456                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7457                 </links>
7458         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7459             <actions>
7460                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7461                     <context link="xact" jump="usr" field="home_ou"/>
7462                 </retrieve>
7463                         </actions>
7464                 </permacrud>
7465         </class>
7466         <class id="mbp" controller="open-ils.cstore" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
7467                 <fields oils_persist:primary="id" oils_persist:sequence="">
7468                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7469                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7470                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7471                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7472                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7473                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7474                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7475                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7476                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7477                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7478                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7479                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7480                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7481                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7482                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7483                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7484                 </fields>
7485                 <links>
7486                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7487                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7488                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7489                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7490                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7491                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7492                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7493                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7494                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7495                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7496                 </links>
7497         </class>
7498         <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">
7499                 <fields oils_persist:primary="id" oils_persist:sequence="">
7500                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7501                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7502                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7503                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7504                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7505                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7506                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7507                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7508                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7509                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7510                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7511                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7512                 </fields>
7513                 <links>
7514                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7515                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7516                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7517                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7518                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7519                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7520                 </links>
7521         </class>
7522         <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">
7523                 <fields oils_persist:primary="id" oils_persist:sequence="">
7524                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7525                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7526                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7527                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7528                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7529                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7530                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7531                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7532                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7533                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7534                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7535                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7536                 </fields>
7537                 <links>
7538                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7539                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7540                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7541                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7542                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7543                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7544                 </links>
7545         </class>
7546         <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">
7547                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7548                         <field name="bucket" reporter:datatype="link"/>
7549                         <field name="id" reporter:datatype="id" />
7550                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7551                         <field name="create_time" reporter:datatype="timestamp" />
7552                         <field name="pos" reporter:datatype="int" />
7553                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7554                 </fields>
7555                 <links>
7556                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7557                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7558             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7559                 </links>
7560                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7561                         <actions>
7562                                 <retrieve permission="ADMIN_COPY_BUCKET">
7563                     <context link="bucket" owning_lib="owning_lib"/>
7564                 </retrieve>
7565             </actions>
7566         </permacrud>
7567         </class>
7568         <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">
7569                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7570                         <field name="id" reporter:datatype="id" />
7571                         <field name="item" reporter:datatype="link"/>
7572                         <field name="note" reporter:datatype="text" />
7573                 </fields>
7574                 <links>
7575                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7576                 </links>
7577         </class>
7578         <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">
7579                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7580                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7581                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7582                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7583                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7584                 </fields>
7585                 <links>
7586                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7587                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7588                 </links>
7589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7590                         <actions>
7591                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7592                         </actions>
7593                 </permacrud>
7594         </class>
7595     <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">
7596         <fields oils_persist:primary="field">
7597             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7598             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7599             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7600         </fields>
7601         <links/>
7602         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7603             <actions>
7604                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7605                 <retrieve />
7606                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7607                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7608             </actions>
7609         </permacrud>
7610     </class>
7611         <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">
7612                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7613                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7614                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7615                 </fields>
7616                 <links/>
7617         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7618             <actions>
7619                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7620                 <retrieve/>
7621                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7622                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7623             </actions>
7624         </permacrud>
7625         </class>
7626
7627
7628         <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">
7629                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7630                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7631                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7632                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7633                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7634                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7635                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7636                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7637                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7638                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7639                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7640                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7641                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7642                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7643                 </fields>
7644                 <links>
7645                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7646                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7647                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7648                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7649                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7650                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7651                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7652                 </links>
7653         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7654             <actions>
7655                 <create permission="TRANSIT_COPY">
7656                     <context link="target_copy" field="owner"/>
7657                 </create>
7658                 <retrieve/>
7659                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7660                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7661             </actions>
7662         </permacrud>
7663         </class>
7664         <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">
7665                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7666                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7667                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7668                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7669                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7670                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7671                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7672                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7673                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7674                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7675                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7676                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7677                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7678                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
7679                 </fields>
7680                 <links>
7681                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7682                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7683                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7684                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7685                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7686                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7687                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7688                 </links>
7689         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7690             <actions>
7691                 <create permission="TRANSIT_COPY" context_field="owner">
7692                     <context link="target_copy" field="circ_lib"/>
7693                 </create>
7694                 <retrieve/>
7695                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7696                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7697             </actions>
7698         </permacrud>
7699         </class>
7700         <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">
7701                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7702                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7703                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7704                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7705                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7706                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7707                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7708                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7709                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7710                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7711                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7712                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
7713                 </fields>
7714                 <links>
7715                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7716                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7717                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7718                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
7719                 </links>
7720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7721             <actions>
7722                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7723                     <context link="xact" jump="usr" field="home_ou"/>
7724                 </retrieve>
7725                         </actions>
7726                 </permacrud>
7727         </class>
7728         <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">
7729                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7730                         <field name="grp" />
7731                         <field name="id" reporter:datatype="id" />
7732                         <field name="usr" />
7733                 </fields>
7734                 <links>
7735                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7736                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7737                 </links>
7738         </class>
7739         <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">
7740                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7741                         <field name="id" reporter:datatype="id" />
7742                         <field name="fq_field" reporter:datatype="text"/>
7743                         <field name="identity_value" reporter:datatype="text"/>
7744                         <field name="translation" reporter:datatype="text"/>
7745                         <field name="string" reporter:datatype="text"/>
7746                 </fields>
7747                 <links>
7748                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7749                 </links>
7750         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7751             <actions>
7752                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7753                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7754                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7755                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7756             </actions>
7757         </permacrud>
7758         </class>
7759         <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">
7760                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7761                         <field name="id" reporter:datatype="id" />
7762                         <field name="fm_class" reporter:datatype="text"/>
7763                         <field name="field" reporter:datatype="text"/>
7764                         <field name="owner" reporter:datatype="org_unit"/>
7765                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7766                 </fields>
7767                 <links>
7768                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7769                 </links>
7770         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7771             <actions>
7772                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7773                 <retrieve/>
7774                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7775                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7776             </actions>
7777         </permacrud>
7778         </class>
7779         <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">
7780                 <fields oils_persist:primary="code">
7781                         <field name="code" reporter:datatype="id" />
7782                         <field name="marc_code" reporter:datatype="text"/>
7783                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7784                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7785                         <field name="rtl" reporter:datatype="bool"/>
7786                 </fields>
7787                 <links/>
7788         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7789             <actions>
7790                 <create permission="CREATE_LOCALE" global_required="true"/>
7791                 <retrieve/>
7792                 <update permission="UPDATE_LOCALE" global_required="true"/>
7793                 <delete permission="DELETE_LOCALE" global_required="true"/>
7794             </actions>
7795         </permacrud>
7796         </class>
7797         <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">
7798                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7799                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7800                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7801                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7802             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7803                 </fields>
7804                 <links>
7805                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7806                 </links>
7807         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7808             <actions>
7809                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7810                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7811                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7812                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7813             </actions>
7814         </permacrud>
7815         </class>
7816
7817         <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">
7818                 <fields oils_persist:primary="id">
7819                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7820                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7821                 </fields>
7822                 <links/>
7823         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7824             <actions>
7825                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7826                 <retrieve/>
7827                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7828                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7829             </actions>
7830         </permacrud>
7831         </class>
7832
7833         <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">
7834                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7835                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7836                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7837                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7838                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7839                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7840                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7841                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7842                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7843                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7844                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7845                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7846                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7847                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7848                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7849                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7850                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7851                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7852                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7853                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7854                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7855                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7856                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7857                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7858                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7859                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7860                 </fields>
7861                 <links>
7862                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7863                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7864                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7865                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7866                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7867                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7868                 </links>
7869         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7870             <actions>
7871                 <create permission="user_request.create">
7872                     <context link="usr" field="home_ou"/>
7873                                 </create>
7874                 <retrieve permission="user_request.view">
7875                     <context link="usr" field="home_ou"/>
7876                                 </retrieve>
7877                 <update permission="user_request.update">
7878                     <context link="usr" field="home_ou"/>
7879                                 </update>
7880                 <delete permission="user_request.delete">
7881                     <context link="usr" field="home_ou"/>
7882                                 </delete>
7883             </actions>
7884         </permacrud>
7885         </class>
7886
7887         <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">
7888                 <fields oils_persist:primary="code">
7889                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7890                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7891                 </fields>
7892                 <links/>
7893         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7894             <actions>
7895                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7896                 <retrieve/>
7897                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7898                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7899             </actions>
7900         </permacrud>
7901         </class>
7902
7903         <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">
7904                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7905                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7906                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7907                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7908                         <field reporter:label="Ratio" name="ratio" />
7909                 </fields>
7910                 <links>
7911                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7912                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7913                 </links>
7914                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7915                         <actions>
7916                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7917                                 <retrieve/>
7918                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7919                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7920                         </actions>
7921                 </permacrud>
7922         </class>
7923
7924         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7925                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7926                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7927                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7928                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7929                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7930                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7931                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7932                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7933                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7934                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7935                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7936                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7937                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7938                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7939                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7940                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7941                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7942                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7943                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
7944                 </fields>
7945                 <links>
7946                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7947                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7948             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7949             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7950                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7951                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
7952                 </links>
7953         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7954             <actions>
7955                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7956                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7957                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7958                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7959             </actions>
7960         </permacrud>
7961         </class>
7962
7963         <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">
7964                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7965                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7966                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7967                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7968                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7969                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7970                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7971                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7972                 </fields>
7973                 <links>
7974                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7975                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7976                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7977                 </links>
7978         </class>
7979
7980         <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">
7981                 <fields oils_persist:primary="code">
7982                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7983                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7984                 </fields>
7985                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7986             <actions>
7987                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7988                 <retrieve/>
7989                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7990                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7991             </actions>
7992                 </permacrud>
7993         </class>
7994
7995         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7996                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7997                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7998                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7999                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8000                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
8001                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
8002                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
8003                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
8004                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
8005                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
8006                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
8007                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8008                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
8009                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
8010                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
8011                 </fields>
8012                 <links>
8013                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
8014                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8015                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
8016                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
8017                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
8018                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
8019                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
8020                 </links>
8021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8022             <actions>
8023                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
8024                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
8025                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
8026                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
8027             </actions>
8028         </permacrud>
8029         </class>
8030
8031         <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">
8032                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
8033                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8034                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8035                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8036                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
8037                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
8038                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
8039                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8040                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
8041                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8042                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8043                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8044                 </fields>
8045                 <links>
8046                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8047                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8048                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8049                 </links>
8050         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8051             <actions>
8052                 <create   permission="ADMIN_INVOICE">
8053                                         <context link="invoice" field="receiver"/>
8054                                 </create>
8055                 <retrieve permission="ADMIN_INVOICE">
8056                                         <context link="invoice" field="receiver"/>
8057                                 </retrieve>
8058                 <update   permission="ADMIN_INVOICE">
8059                                         <context link="invoice" field="receiver"/>
8060                                 </update>
8061                                 <delete   permission="ADMIN_INVOICE">
8062                                         <context link="invoice" field="receiver"/>
8063                                 </delete>
8064             </actions>
8065         </permacrud>
8066         </class>
8067
8068         <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">
8069                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
8070                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8071                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8072                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8073                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8074                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
8075                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
8076                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8077                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8078                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8079                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8080                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8081                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8082                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
8083                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8084                 </fields>
8085                 <links>
8086                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8087                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8088                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8089                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8090                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8091                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
8092                 </links>
8093         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8094             <actions>
8095                 <create   permission="ADMIN_INVOICE">
8096                                         <context link="invoice" field="receiver"/>
8097                                 </create>
8098                 <retrieve permission="ADMIN_INVOICE">
8099                                         <context link="invoice" field="receiver"/>
8100                                 </retrieve>
8101                 <update   permission="ADMIN_INVOICE">
8102                                         <context link="invoice" field="receiver"/>
8103                                 </update>
8104                                 <delete   permission="ADMIN_INVOICE">
8105                                         <context link="invoice" field="receiver"/>
8106                                 </delete>
8107             </actions>
8108         </permacrud>
8109         </class>
8110
8111         <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">
8112                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
8113                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
8114                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8115                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8116                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8117                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8118                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8119                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
8120                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8121                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
8122                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
8123                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
8124                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8125                 </fields>
8126                 <links>
8127                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8128                 </links>
8129         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8130             <actions>
8131                 <create permission="ADMIN_PROVIDER">
8132                     <context link="provider" field="owner"/>
8133                 </create>
8134                 <retrieve permission="ADMIN_PROVIDER">
8135                     <context link="provider" field="owner"/>
8136                 </retrieve>
8137                 <update permission="ADMIN_PROVIDER">
8138                     <context link="provider" field="owner"/>
8139                 </update>
8140                 <delete permission="ADMIN_PROVIDER">
8141                     <context link="provider" field="owner"/>
8142                 </delete>
8143             </actions>
8144         </permacrud>
8145         </class>
8146
8147         <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">
8148                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
8149                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8150                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8151                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8152                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
8153                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
8154                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
8155         </fields>
8156                 <links>
8157                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8158                 </links>
8159         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8160             <actions>
8161                 <create permission="ADMIN_PROVIDER">
8162                     <context link="provider" field="owner"/>
8163                 </create>
8164                 <retrieve permission="ADMIN_PROVIDER">
8165                     <context link="provider" field="owner"/>
8166                 </retrieve>
8167                 <update permission="ADMIN_PROVIDER">
8168                     <context link="provider" field="owner"/>
8169                 </update>
8170                 <delete permission="ADMIN_PROVIDER">
8171                     <context link="provider" field="owner"/>
8172                 </delete>
8173             </actions>
8174         </permacrud>
8175     </class>
8176         <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">
8177                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
8178                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
8179                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8180                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8181                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8182                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
8183                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8184                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8185                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
8186                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
8187                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
8188                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
8189                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8190                 </fields>
8191                 <links>
8192                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
8193                 </links>
8194         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8195             <actions>
8196                 <create permission="ADMIN_PROVIDER">
8197                     <context link="contact" jump='provider' field="owner"/>
8198                 </create>
8199                 <retrieve permission="ADMIN_PROVIDER">
8200                     <context link="contact" jump='provider' field="owner"/>
8201                 </retrieve>
8202                 <update permission="ADMIN_PROVIDER">
8203                     <context link="contact" jump='provider' field="owner"/>
8204                 </update>
8205                 <delete permission="ADMIN_PROVIDER">
8206                     <context link="contact" jump='provider' field="owner"/>
8207                 </delete>
8208             </actions>
8209         </permacrud>
8210         </class>
8211
8212         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
8213                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
8214                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
8215                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
8216                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
8217                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
8218                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
8219                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
8220                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
8221                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8222                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
8223                 </fields>
8224                 <links>
8225                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
8226                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
8227                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
8228                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8229                 </links>
8230         </class>
8231
8232         <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">
8233                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
8234                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8235                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
8236                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
8237                 </fields>
8238                 <links>
8239             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
8240                 </links>
8241                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8242                         <actions>
8243                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8244                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8245                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8246                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8247                         </actions>
8248                 </permacrud>
8249         </class>
8250
8251         <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">
8252                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
8253                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
8254                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
8255                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
8256                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
8257                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
8258                 </fields>
8259                 <links>
8260                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
8261                 </links>
8262                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8263                         <actions>
8264                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8265                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8266                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8267                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
8268                         </actions>
8269                 </permacrud>
8270         </class>
8271
8272         <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">
8273                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
8274                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8275                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8276                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8277                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8278                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8279                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8280                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8281                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
8282                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
8283                 </fields>
8284                 <links>
8285                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8286                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8287             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
8288             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
8289                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
8290                 </links>
8291         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8292             <actions>
8293                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8294                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
8295                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8296                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
8297             </actions>
8298         </permacrud>
8299         </class>
8300
8301         <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">
8302                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
8303                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
8304                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
8305                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8306                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8307                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
8308                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
8309                 </fields>
8310                 <links>
8311                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8312                 </links>
8313                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8314                         <actions>
8315                                 <create permission="ADMIN_FUNDING_SOURCE">
8316                     <context link="funding_source" field="owner"/>
8317                 </create>
8318                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
8319                     <context link="funding_source" field="owner"/>
8320                 </retrieve>
8321                                 <update permission="ADMIN_FUNDING_SOURCE">
8322                     <context link="funding_source" field="owner"/>
8323                 </update>
8324                                 <delete permission="ADMIN_FUNDING_SOURCE">
8325                     <context link="funding_source" field="owner"/>
8326                 </delete>
8327                         </actions>
8328                 </permacrud>
8329         </class>
8330
8331         <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">
8332                 <fields oils_persist:primary="id">
8333                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
8334                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
8335                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
8336                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
8337                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
8338                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8339                 </fields>
8340                 <links>
8341                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8342                 </links>
8343         </class>
8344
8345         <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">
8346                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
8347                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
8348                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8349                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
8350                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
8351                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8352                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
8353                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
8354                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8355                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
8356                 </fields>
8357                 <links>
8358                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8359                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8360                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
8361                 </links>
8362                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8363                         <actions>
8364                                 <create permission="ADMIN_ACQ_FUND">
8365                     <context link="fund" field="org"/>
8366                 </create>
8367                                 <retrieve permission="ADMIN_ACQ_FUND">
8368                     <context link="fund" field="org"/>
8369                 </retrieve>
8370                                 <update permission="ADMIN_ACQ_FUND">
8371                     <context link="fund" field="org"/>
8372                 </update>
8373                                 <delete permission="ADMIN_ACQ_FUND">
8374                     <context link="fund" field="org"/>
8375                 </delete>
8376                         </actions>
8377                 </permacrud>
8378         </class>
8379
8380         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
8381                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8382                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8383                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8384                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8385                         <field reporter:label="Year" name="year" reporter:datatype="int" />
8386                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8387                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8388                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8389                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8390                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8391                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8392                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8393                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8394                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8395                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8396                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8397                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8398                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8399                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8400                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8401                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8402                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8403                 </fields>
8404                 <links>
8405                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8406                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8407             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8408             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8409             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8410             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8411             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8412             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8413             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8414             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8415             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8416                 </links>
8417         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8418             <actions>
8419                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8420                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8421                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8422                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8423             </actions>
8424         </permacrud>
8425         </class>
8426
8427         <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">
8428                 <fields oils_persist:primary="fund">
8429                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8430                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8431                 </fields>
8432                 <links>
8433                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8434                 </links>
8435         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8436             <actions>
8437                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8438                                         <context link="fund" field="org" />
8439                 </retrieve>
8440             </actions>
8441         </permacrud>
8442         </class>
8443
8444         <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">
8445                 <fields oils_persist:primary="fund">
8446                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8447                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8448                 </fields>
8449                 <links>
8450                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8451                 </links>
8452         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8453             <actions>
8454                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8455                                         <context link="fund" field="org" />
8456                 </retrieve>
8457             </actions>
8458         </permacrud>
8459         </class>
8460
8461         <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">
8462                 <fields oils_persist:primary="fund">
8463                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8464                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8465                 </fields>
8466                 <links>
8467                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8468                 </links>
8469         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8470             <actions>
8471                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8472                                         <context link="fund" field="org" />
8473                 </retrieve>
8474             </actions>
8475         </permacrud>
8476         </class>
8477
8478         <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">
8479                 <fields oils_persist:primary="fund">
8480                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8481                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8482                 </fields>
8483                 <links>
8484                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8485                 </links>
8486         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8487             <actions>
8488                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8489                                         <context link="fund" field="org" />
8490                 </retrieve>
8491             </actions>
8492         </permacrud>
8493         </class>
8494
8495         <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">
8496                 <fields oils_persist:primary="fund">
8497                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8498                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8499                 </fields>
8500                 <links>
8501                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8502                 </links>
8503         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8504             <actions>
8505                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8506                                         <context link="fund" field="org" />
8507                 </retrieve>
8508             </actions>
8509         </permacrud>
8510         </class>
8511
8512    <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">
8513         <fields oils_persist:primary="fund">
8514             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8515             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8516         </fields>
8517         <links>
8518             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8519         </links>
8520     </class>
8521
8522    <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">
8523         <fields oils_persist:primary="fund">
8524             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8525             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8526         </fields>
8527         <links>
8528             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8529         </links>
8530     </class>
8531
8532    <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">
8533         <fields oils_persist:primary="fund">
8534             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8535             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8536         </fields>
8537         <links>
8538             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8539         </links>
8540     </class>
8541
8542    <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">
8543         <fields oils_persist:primary="fund">
8544             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8545             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8546         </fields>
8547         <links>
8548             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8549         </links>
8550     </class>
8551
8552    <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">
8553         <fields oils_persist:primary="fund">
8554             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8555             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8556         </fields>
8557         <links>
8558             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8559         </links>
8560     </class>
8561
8562         <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">
8563                 <fields oils_persist:primary="funding_source">
8564                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8565                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8566                 </fields>
8567                 <links>
8568                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8569                 </links>
8570         </class>
8571
8572         <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">
8573                 <fields oils_persist:primary="funding_source">
8574                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8575                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8576                 </fields>
8577                 <links>
8578                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8579                 </links>
8580         </class>
8581
8582         <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">
8583                 <fields oils_persist:primary="funding_source">
8584                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8585                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8586                 </fields>
8587                 <links>
8588                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8589                 </links>
8590         </class>
8591
8592         <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">
8593                 <fields oils_persist:primary="fund">
8594                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8595                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8596                 </fields>
8597                 <links>
8598                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8599                 </links>
8600         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8601             <actions>
8602                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8603                                         <context link="fund" field="org" />
8604                 </retrieve>
8605             </actions>
8606         </permacrud>
8607     </class>
8608     <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">
8609         <oils_persist:source_definition><![CDATA[
8610             SELECT
8611                 acqf.*,
8612                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8613                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8614                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8615                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8616             FROM
8617                 acq.fund acqf
8618                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8619                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8620                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8621                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8622         ]]></oils_persist:source_definition>
8623         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8624             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8625             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8626             <field reporter:label="Name" name="name" reporter:datatype="text" />
8627             <field reporter:label="Year" name="year" reporter:datatype="int" />
8628             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8629             <field reporter:label="Code" name="code" reporter:datatype="text" />
8630             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8631             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8632             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8633             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8634             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8635
8636             <!-- non fund-native fields -->
8637             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8638             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8639             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8640             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8641         </fields>
8642         <links>
8643             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8644             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8645             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8646         </links>
8647         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8648             <actions>
8649                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8650             </actions>
8651         </permacrud>
8652         </class>
8653         <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">
8654                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8655                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8656                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8657                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8658                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8659                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8660                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8661                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8662                 </fields>
8663                 <links>
8664                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8665                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8666                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8667                 </links>
8668                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8669                         <actions>
8670                                 <create permission="ADMIN_ACQ_FUND">
8671                     <context link="fund" field="org"/>
8672                 </create>
8673                                 <retrieve permission="ADMIN_ACQ_FUND">
8674                     <context link="fund" field="org"/>
8675                 </retrieve>
8676                                 <update permission="ADMIN_ACQ_FUND">
8677                     <context link="fund" field="org"/>
8678                 </update>
8679                                 <delete permission="ADMIN_ACQ_FUND">
8680                     <context link="fund" field="org"/>
8681                 </delete>
8682                         </actions>
8683                 </permacrud>
8684         </class>
8685
8686     <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">
8687         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8688             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8689             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8690             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8691             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8692             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8693             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8694             <field reporter:label="Note" name="note" reporter:datatype="text" />
8695             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8696         </fields>
8697         <links>
8698             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8699             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8700             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8701         </links>
8702                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8703                         <actions>
8704                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8705                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8706                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8707                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8708                         </actions>
8709                 </permacrud>
8710     </class>
8711
8712         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8713                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8714                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8715                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8716                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8717                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8718                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8719                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8720                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8721                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8722                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8723                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8724                 </fields>
8725                 <links>
8726                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8727                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8728                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8729                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8730                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8731                 </links>
8732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8733                         <actions>
8734                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8735                         </actions>
8736                 </permacrud>
8737         </class>
8738
8739         <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">
8740                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8741                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8742                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8743                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8744                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8745                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8746                 </fields>
8747                 <links>
8748                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8749                 </links>
8750                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8751                         <actions>
8752                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8753                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8754                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8755                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8756                         </actions>
8757                 </permacrud>
8758         </class>
8759
8760         <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">
8761                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8762                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8763                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8764                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8765                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8766                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8767                         <field reporter:label="State" name="state" reporter:datatype="text" />
8768                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8769                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8770                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8771                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8772                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8773                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8774                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8775                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8776                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8777                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8778                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8779                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8780                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8781                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8782                 </fields>
8783                 <links>
8784                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8785                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8786                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8787                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8788                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8789                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8790                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8791                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8792                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8793                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8794                 </links>
8795                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8796                         <actions>
8797                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8798                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8799                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8800                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8801                         </actions>
8802                 </permacrud>
8803         </class>
8804
8805         <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">
8806                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8807                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8808                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8809                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8810                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8811                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8812                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8813                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8814                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8815                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8816                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8817                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8818                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8819                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8820                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8821                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8822                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8823                 </fields>
8824                 <links>
8825                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8826                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8827                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8828                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8829                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8830                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8831                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8832                 </links>
8833                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8834             <actions>
8835                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8836             </actions>
8837                 </permacrud>
8838         </class>
8839
8840         <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">
8841                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8842                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8843                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8844                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8845                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8846                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8847                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8848                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8849                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8850                 </fields>
8851                 <links>
8852                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8853                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8854                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8855                 </links>
8856                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8857             <actions>
8858                 <create permission="CREATE_PURCHASE_ORDER">
8859                     <context link="purchase_order" field="ordering_agency"/>
8860                 </create>
8861                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8862                     <context link="purchase_order" field="ordering_agency"/>
8863                 </retrieve>
8864                 <update permission="CREATE_PURCHASE_ORDER">
8865                     <context link="purchase_order" field="ordering_agency"/>
8866                 </update>
8867                 <delete permission="CREATE_PURCHASE_ORDER">
8868                     <context link="purchase_order" field="ordering_agency"/>
8869                 </delete>
8870             </actions>
8871                 </permacrud>
8872         </class>
8873
8874         <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">
8875                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8876                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8877                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8878                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8879                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8880                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8881                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8882                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8883                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8884                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8885                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8886                 </fields>
8887                 <links>
8888                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8889                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8890                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8891                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8892                 </links>
8893                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8894             <actions>
8895                 <create permission="CREATE_PURCHASE_ORDER">
8896                     <context link="purchase_order" field="ordering_agency"/>
8897                 </create>
8898                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8899                     <context link="purchase_order" field="ordering_agency"/>
8900                 </retrieve>
8901                 <update permission="CREATE_PURCHASE_ORDER">
8902                     <context link="purchase_order" field="ordering_agency"/>
8903                 </update>
8904                 <delete permission="CREATE_PURCHASE_ORDER">
8905                     <context link="purchase_order" field="ordering_agency"/>
8906                 </delete>
8907             </actions>
8908                 </permacrud>
8909         </class>
8910
8911         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8912                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8913                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8914                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8915                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8916                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8917                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8918                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8919                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8920                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8921                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8922                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8923                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8924                         <field reporter:label="State" name="state" reporter:datatype="text" />
8925                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8926                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8927                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8928                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8929                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8930                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8931                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8932                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8933                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8934                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8935                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8936                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8937                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8938                 </fields>
8939                 <links>
8940                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8941                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8942                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8943                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8944                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8945                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8946                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8947                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8948                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8949                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8950                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8951                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8952                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8953                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8954                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8955                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8956                 </links>
8957                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8958                         <actions>
8959                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8960                                         <context link="purchase_order" field="ordering_agency"/>
8961                                         <context link="picklist" field="org_unit"/>
8962                                 </retrieve>
8963                         </actions>
8964                 </permacrud>
8965         </class>
8966
8967         <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">
8968                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8969                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8970                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8971                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8972                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8973                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8974                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8975                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8976                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8977                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8978                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8979                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8980                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8981                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8982                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8983                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8984                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8985                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8986                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8987                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8988                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8989                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8990                 </fields>
8991                 <links>
8992                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8993                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8994                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8995                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8996                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8997                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8998                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8999                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9000                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9001                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9002                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9003                 </links>
9004                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9005                         <actions>
9006                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9007                                         <context link="purchase_order" field="ordering_agency"/>
9008                                         <context link="picklist" field="org_unit"/>
9009                                 </retrieve>
9010                         </actions>
9011                 </permacrud>
9012         </class>
9013
9014         <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">
9015                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
9016                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
9017                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9018                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9019                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9020                 </fields>
9021                 <links>
9022                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9023                 </links>
9024                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9025                         <actions>
9026                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9027                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
9028                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9029                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9030                         </actions>
9031                 </permacrud>
9032         </class>
9033
9034         <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">
9035                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
9036                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
9037                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
9038                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9039                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9040                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9041                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9042                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9043                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
9044                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9045                 </fields>
9046                 <links>
9047                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9048                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9049                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9050                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
9051                 </links>
9052         </class>
9053
9054         <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">
9055                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
9056                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
9057                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
9058                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
9059                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
9060                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
9061                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
9062                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
9063                 </fields>
9064                 <links>
9065                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9066                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
9067                 </links>
9068         </class>
9069
9070         <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">
9071                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
9072                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
9073                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9074                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
9075                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
9076                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
9077                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
9078                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
9079                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9080                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
9081                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9082                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
9083                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
9084                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9085                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
9086                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9087                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
9088                 </fields>
9089                 <links>
9090                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9091                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
9092                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9093                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9094                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9095                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9096                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9097                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9098                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
9099                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
9100                 </links>
9101         </class>
9102
9103         <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">
9104                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9105                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9106                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9107                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9108                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9109                 </fields>
9110                 <links/>
9111                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9112                         <actions>
9113                                 <retrieve />
9114                         </actions>
9115                 </permacrud>
9116         </class>
9117
9118         <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">
9119                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9120                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9121                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9122                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9123                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9124                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9125             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9126                 </fields>
9127                 <links/>
9128         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9129             <actions>
9130                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9131                 <retrieve />
9132                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9133                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9134             </actions>
9135         </permacrud>
9136         </class>
9137
9138         <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">
9139                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9140                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9141                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9142                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9143                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9144                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9145                 </fields>
9146                 <links/>
9147         </class>
9148         <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">
9149                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9150                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9151                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9152                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9153                         <field reporter:label="User" name="usr" reporter:datatype="link" />
9154                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9155                 </fields>
9156                 <links>
9157                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9158                 </links>
9159         </class>
9160
9161         <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">
9162             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9163                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9164                 <field reporter:label="Code" name="code" reporter:datatype="text" />
9165                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9166                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9167                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9168                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9169         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9170
9171             </fields>
9172             <links>
9173                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9174             </links>
9175             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9176                 <actions>
9177                     <create permission="ADMIN_PROVIDER">
9178                         <context link="provider" field="owner"/>
9179                     </create>
9180                     <retrieve permission="ADMIN_PROVIDER">
9181                         <context link="provider" field="owner"/>
9182                     </retrieve>
9183                     <update permission="ADMIN_PROVIDER">
9184                         <context link="provider" field="owner"/>
9185                     </update>
9186                     <delete permission="ADMIN_PROVIDER">
9187                         <context link="provider" field="owner"/>
9188                     </delete>
9189                 </actions>
9190             </permacrud>
9191         </class>
9192         
9193         <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">
9194             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
9195                 <field reporter:label="ID" name="id" reporter:datatype="id" />
9196                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9197                 <field reporter:label="Name" name="name" reporter:datatype="text" />
9198                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
9199             </fields>
9200             <links>
9201                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9202             </links>
9203             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9204                 <actions>
9205                     <create permission="ADMIN_PROVIDER">
9206                         <context link="provider" field="owner"/>
9207                     </create>
9208                     <retrieve permission="ADMIN_PROVIDER">
9209                         <context link="provider" field="owner"/>
9210                     </retrieve>
9211                     <update permission="ADMIN_PROVIDER">
9212                         <context link="provider" field="owner"/>
9213                     </update>
9214                     <delete permission="ADMIN_PROVIDER">
9215                         <context link="provider" field="owner"/>
9216                     </delete>
9217                 </actions>
9218             </permacrud>
9219         </class>
9220         
9221         <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">
9222             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9223                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9224                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9225                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9226                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9227                 </fields>
9228                 <links/>
9229         </class>
9230
9231         <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">
9232                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
9233                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
9234                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
9235                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
9236                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
9237                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
9238                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
9239                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
9240                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
9241                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
9242                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
9243                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
9244                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
9245                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
9246                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
9247                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes"/>
9248                 </fields>
9249                 <links>
9250                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9251                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9252                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9253                 </links>
9254         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9255             <actions>
9256                 <create permission="ADMIN_PROVIDER">
9257                     <context link="provider" field="owner"/>
9258                 </create>
9259                 <retrieve permission="ADMIN_PROVIDER">
9260                     <context link="provider" field="owner"/>
9261                 </retrieve>
9262                 <update permission="ADMIN_PROVIDER">
9263                     <context link="provider" field="owner"/>
9264                 </update>
9265                 <delete permission="ADMIN_PROVIDER">
9266                     <context link="provider" field="owner"/>
9267                 </delete>
9268             </actions>
9269         </permacrud>
9270         </class>
9271
9272         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
9273                 oils_obj:fieldmapper="acq::edi_attr" 
9274                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
9275                 <fields oils_persist:primary="key">
9276                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
9277                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9278                 </fields>
9279         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9280             <actions>
9281                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9282                 <retrieve/>
9283                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9284                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9285             </actions>
9286         </permacrud>
9287         </class>
9288         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
9289                 oils_obj:fieldmapper="acq::edi_attr_set" 
9290                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
9291                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
9292                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9293                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
9294                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
9295                 </fields>
9296                 <links>
9297                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
9298                 </links>
9299         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9300             <actions>
9301                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9302                 <retrieve/>
9303                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9304                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9305             </actions>
9306         </permacrud>
9307         </class>
9308         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
9309                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
9310                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
9311                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
9312                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
9313                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
9314                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
9315                 </fields>
9316                 <links>
9317                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
9318                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
9319                 </links>
9320         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9321             <actions>
9322                 <create permission="ADMIN_PROVIDER" global_required="true"/>
9323                 <retrieve/>
9324                 <update permission="ADMIN_PROVIDER" global_required="true"/>
9325                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
9326             </actions>
9327         </permacrud>
9328         </class>
9329
9330
9331         <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">
9332                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
9333                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
9334                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
9335                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
9336                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
9337                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
9338                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
9339                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
9340                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
9341                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
9342                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
9343                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
9344                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
9345                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
9346                 </fields>
9347                 <links>
9348                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
9349                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9350                 </links>
9351         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9352             <actions>
9353                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9354                     <context link="account" jump="provider" field="owner"/>
9355                 </retrieve>
9356                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9357                     <context link="account" jump="provider" field="owner"/>
9358                 </update>
9359                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
9360                     <context link="account" jump="provider" field="owner"/>
9361                 </delete>
9362             </actions>
9363         </permacrud>
9364         </class>
9365
9366
9367         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
9368                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
9369                         <field name="id" reporter:datatype="id" />
9370                         <field name="parent" reporter:datatype="link"/>
9371                         <field name="owner" reporter:datatype="link"/>
9372                         <field name="create_time" reporter:datatype="timestamp"/>
9373                         <field name="name" reporter:datatype="text"/>
9374                         <field name="shared" reporter:datatype="bool"/>
9375                         <field name="share_with" reporter:datatype="link"/>
9376                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9377                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
9378                 </fields>
9379                 <links>
9380                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9381                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
9382                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
9383                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9384                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
9385                 </links>
9386         </class>
9387         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
9388                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
9389                         <field name="id" reporter:datatype="id" />
9390                         <field name="parent" reporter:datatype="link"/>
9391                         <field name="owner" reporter:datatype="link"/>
9392                         <field name="create_time" reporter:datatype="timestamp"/>
9393                         <field name="name" reporter:datatype="text"/>
9394                         <field name="shared" reporter:datatype="bool"/>
9395                         <field name="share_with" reporter:datatype="link"/>
9396                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9397                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
9398                 </fields>
9399                 <links>
9400                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9401                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
9402                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
9403                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9404                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
9405                 </links>
9406         </class>
9407         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
9408                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
9409                         <field name="id" reporter:datatype="id" />
9410                         <field name="parent" reporter:datatype="link"/>
9411                         <field name="owner" reporter:datatype="link"/>
9412                         <field name="create_time" reporter:datatype="timestamp"/>
9413                         <field name="name" reporter:datatype="text"/>
9414                         <field name="shared" reporter:datatype="bool"/>
9415                         <field name="share_with" reporter:datatype="link"/>
9416                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
9417                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9418                 </fields>
9419                 <links>
9420                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9421                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
9422                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
9423                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
9424                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
9425                 </links>
9426         </class>
9427         <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">
9428                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
9429                         <field name="id" reporter:datatype="id" />
9430                         <field name="owner" reporter:datatype="link"/>
9431                         <field name="create_time" reporter:datatype="timestamp"/>
9432                         <field name="name" reporter:datatype="text"/>
9433                         <field name="data" reporter:datatype="text"/>
9434                         <field name="folder" reporter:datatype="link"/>
9435                         <field name="description" reporter:datatype="text"/>
9436                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
9437                 </fields>
9438                 <links>
9439                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9440                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
9441                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
9442                 </links>
9443         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9444             <actions>
9445                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9446                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9447                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9448                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
9449             </actions>
9450         </permacrud>
9451         </class>
9452         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
9453                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
9454                         <field name="id" reporter:datatype="id" />
9455                         <field name="owner" reporter:datatype="link"/>
9456                         <field name="create_time" reporter:datatype="timestamp"/>
9457                         <field name="template" reporter:datatype="link"/>
9458                         <field name="data" reporter:datatype="text"/>
9459                         <field name="folder" reporter:datatype="link"/>
9460                         <field name="recur" reporter:datatype="bool"/>
9461                         <field name="recurrence" reporter:datatype="interval"/>
9462                         <field name="name" reporter:datatype="text"/>
9463                         <field name="description" reporter:datatype="text"/>
9464                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9465                 </fields>
9466                 <links>
9467                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9468                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
9469                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
9470                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
9471                 </links>
9472         </class>
9473         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
9474                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
9475                         <field name="id" reporter:datatype="id" />
9476                         <field name="runner" reporter:datatype="link"/>
9477                         <field name="start_time" reporter:datatype="timestamp"/>
9478                         <field name="complete_time" reporter:datatype="timestamp"/>
9479                         <field name="run_time" reporter:datatype="timestamp"/>
9480                         <field name="email" reporter:datatype="text"/>
9481                         <field name="excel_format" reporter:datatype="bool"/>
9482                         <field name="csv_format" reporter:datatype="bool"/>
9483                         <field name="html_format" reporter:datatype="bool"/>
9484                         <field name="error_code" reporter:datatype="int"/>
9485                         <field name="error_text" reporter:datatype="text"/>
9486                         <field name="report" reporter:datatype="link"/>
9487                         <field name="folder" reporter:datatype="link"/>
9488                         <field name="chart_pie" reporter:datatype="bool"/>
9489                         <field name="chart_bar" reporter:datatype="bool"/>
9490                         <field name="chart_line" reporter:datatype="bool"/>
9491                 </fields>
9492                 <links>
9493                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9494                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9495                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9496                 </links>
9497         </class>
9498         <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">
9499                 <fields oils_persist:primary="id">
9500                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9501                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9502                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9503                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9504                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9505                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9506                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9507                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9508                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9509                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9510                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9511                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9512                 </fields>
9513                 <links>
9514                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9515                 </links>
9516                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9517                         <actions>
9518                                 <retrieve />
9519                         </actions>
9520                 </permacrud>
9521         </class>
9522         <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">
9523                 <fields oils_persist:primary="id">
9524                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9525                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9526                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9527                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9528                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9529                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9530                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9531                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9532                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9533                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9534                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9535                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9536                 </fields>
9537                 <links>
9538                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9539                 </links>
9540         </class>
9541         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9542                 <fields oils_persist:primary="id">
9543                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9544                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9545                         <field reporter:label="Fingerprint" name="fingerprint" />
9546                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9547                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9548                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9549                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9550                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9551                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9552                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9553                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9554                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9555                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9556                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9557                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9558                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9559                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9560                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9561                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9562                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9563                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9564                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9565                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9566                 </fields>
9567                 <links>
9568                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9569                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9570                 </links>
9571         </class>
9572         <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">
9573                 <fields oils_persist:primary="id">
9574                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9575                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9576                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9577                 </fields>
9578                 <links>
9579                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9580                 </links>
9581         </class>
9582         <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">
9583                 <fields oils_persist:primary="id">
9584                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9585                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9586                 </fields>
9587                 <links>
9588                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9589                 </links>
9590         </class>
9591         <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">
9592                 <fields oils_persist:primary="id">
9593                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9594                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9595                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9596                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9597                 </fields>
9598                 <links>
9599                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9600                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9601                 </links>
9602         </class>
9603         <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">
9604                 <fields oils_persist:primary="xact">
9605                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9606                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9607                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9608                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9609                 </fields>
9610                 <links>
9611                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9612                 </links>
9613         </class>
9614         <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">
9615                 <fields oils_persist:primary="xact">
9616                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9617                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9618                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9619                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9620                 </fields>
9621                 <links>
9622                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9623                 </links>
9624         </class>
9625         <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)">
9626                 <fields oils_persist:primary="id">
9627                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9628                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9629                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9630                 </fields>
9631                 <links>
9632                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9633                 </links>
9634         </class>
9635         <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">
9636                 <fields oils_persist:primary="id">
9637                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9638                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9639                 </fields>
9640                 <links>
9641                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9642                 </links>
9643         </class>
9644         <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">
9645                 <fields oils_persist:primary="bibid">
9646                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
9647                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
9648                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
9649                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
9650                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
9651                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
9652                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
9653                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
9654                 </fields>
9655                 <links>
9656                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
9657                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9658                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9659                 </links>
9660         </class>
9661         <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">
9662                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9663                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9664                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9665                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9666                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9667                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9668                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9669                 </fields>
9670                 <links>
9671                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9672                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9673                 </links>
9674                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9675                         <actions>
9676                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9677                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9678                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9679                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9680                         </actions>
9681                 </permacrud>
9682         </class>
9683         <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">
9684                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9685                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9686                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9687                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9688                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9689                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9690                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9691                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9692                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9693                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9694                 </fields>
9695                 <links>
9696                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9697                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9698                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9699                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9700                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9701                 </links>
9702                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9703                         <actions>
9704                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9705                                         <context link="formula" field="owner"/>
9706                                 </create>
9707                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9708                                         <context link="formula" field="owner"/>
9709                                 </retrieve>
9710                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9711                                         <context link="formula" field="owner"/>
9712                                 </update>
9713                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9714                                         <context link="formula" field="owner"/>
9715                                 </delete>
9716                         </actions>
9717                 </permacrud>
9718         </class>
9719
9720         <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">
9721                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9722                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9723                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9724                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9725                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9726                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9727                 </fields>
9728                 <links>
9729                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9730                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9731                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9732                 </links>
9733                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9734                         <actions>
9735                                 <create permission="CREATE_PURCHASE_ORDER">
9736                                         <context link="formula" field="owner"/>
9737                 </create>
9738                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9739                                         <context link="formula" field="owner"/>
9740                 </retrieve>
9741                                 <update permission="CREATE_PURCHASE_ORDER">
9742                                         <context link="formula" field="owner"/>
9743                 </update>
9744                                 <delete permission="CREATE_PURCHASE_ORDER">
9745                                         <context link="formula" field="owner"/>
9746                 </delete>
9747                         </actions>
9748                 </permacrud>
9749         </class>
9750
9751         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9752                 <fields oils_persist:primary="id">
9753                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9754                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9755                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9756                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9757                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9758                 </fields>
9759                 <links>
9760                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9761                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9762                 </links>
9763         </class>
9764
9765         <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">
9766                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9767                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9768                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9769                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9770                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9771                 </fields>
9772                 <links>
9773                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9774                 </links>
9775                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9776                         <actions>
9777                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9778                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9779                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9780                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9781                         </actions>
9782                 </permacrud>
9783         </class>
9784
9785         <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">
9786                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9787                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9788                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9789                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9790                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9791                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9792                 </fields>
9793                 <links>
9794                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9795                 </links>
9796                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9797                         <actions>
9798                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9799                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9800                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9801                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9802                         </actions>
9803                 </permacrud>
9804         </class>
9805
9806         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9807                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9808                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9809                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9810                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9811                 </fields>
9812                 <links>
9813                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9814                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9815                 </links>
9816         </class>
9817
9818         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9819                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9820                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9821                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9822                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9823                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9824                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9825                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9826                 </fields>
9827                 <links>
9828                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9829                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9830                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9831                 </links>
9832         </class>
9833
9834         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9835                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9836                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9837                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9838                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9839                 </fields>
9840                 <links>
9841                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9842                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9843                 </links>
9844         </class>
9845
9846         <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">
9847                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9848                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9849                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9850                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9851                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9852                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9853                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9854                 </fields>
9855                 <links>
9856                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9857                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9858                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9859                 </links>
9860         </class>
9861
9862         <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">
9863                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9864                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9865                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9866                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9867                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9868                 </fields>
9869                 <links>
9870                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9871                 </links>
9872                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9873             <actions>
9874                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9875                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9876                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9877                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9878             </actions>
9879                 </permacrud>
9880         </class>
9881
9882         <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">
9883                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9884                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9885                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9886                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9887                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9888                 </fields>
9889                 <links>
9890                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9891                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9892                 </links>
9893                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9894                         <actions>
9895                                 <create permission="ADMIN_CLAIM_POLICY">
9896                                         <context link="claim_policy" field="org_unit"/>
9897                 </create>
9898                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9899                                         <context link="claim_policy" field="org_unit"/>
9900                 </retrieve>
9901                                 <update permission="ADMIN_CLAIM_POLICY">
9902                                         <context link="claim_policy" field="org_unit"/>
9903                 </update>
9904                                 <delete permission="ADMIN_CLAIM_POLICY">
9905                                         <context link="claim_policy" field="org_unit"/>
9906                 </delete>
9907                         </actions>
9908                 </permacrud>
9909         </class>
9910
9911     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9912         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9913             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9914             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9915             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9916             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9917             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9918             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9919             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9920             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9921             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9922             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9923             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9924             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9925             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9926             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9927             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9928             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9929         </fields>
9930         <links>
9931             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9932         </links>
9933     </class>
9934
9935     <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">
9936         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9937             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9938             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9939             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9940             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9941             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9942         </fields>
9943     </class>
9944
9945     <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">
9946         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9947             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9948             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9949             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9950             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9951             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9952             <field reporter:label="City" name="city" reporter:datatype="text"/>
9953             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9954             <field reporter:label="State" name="state" reporter:datatype="text"/>
9955             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9956             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9957             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9958         </fields>
9959     </class>
9960
9961     <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">
9962         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9963             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9964             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9965             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9966             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9967             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9968             <field reporter:label="City" name="city" reporter:datatype="text"/>
9969             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9970             <field reporter:label="State" name="state" reporter:datatype="text"/>
9971             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9972             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9973             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9974         </fields>
9975     </class>
9976
9977     <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">
9978         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9979             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9980             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9981             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9982             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9983             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9984             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9985         </fields>
9986     </class>
9987
9988     <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">
9989         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
9990             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9991             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9992             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9993             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
9994             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
9995             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9996         </fields>
9997     </class>
9998
9999         <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">
10000                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
10001                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
10002                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10003                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
10004                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
10005                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
10006                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
10007                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
10008                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
10009                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10010                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10011                 </fields>
10012                 <links>
10013                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10014                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10015                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
10016                 </links>
10017                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10018                         <actions>
10019                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10020                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10021                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10022                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10023                         </actions>
10024                 </permacrud>
10025         </class>
10026
10027         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
10028                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
10029                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
10030                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10031                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10032                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
10033                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
10034                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
10035                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
10036                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
10037                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
10038                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
10039                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
10040                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
10041                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
10042                 </fields>
10043                 <links>
10044                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10045                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10046                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10047                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
10048                 </links>
10049                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10050                         <actions>
10051                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10052                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10053                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10054                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10055                         </actions>
10056                 </permacrud>
10057         </class>
10058
10059         <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">
10060                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
10061                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
10062                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
10063                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
10064                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
10065                 </fields>
10066                 <links>
10067                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
10068                 </links>
10069                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
10070                         <actions>
10071                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10072                     <context link="fieldset" field="owning_lib"/>
10073                 </create>
10074                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10075                     <context link="fieldset" field="owning_lib"/>
10076                 </retrieve>
10077                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10078                     <context link="fieldset" field="owning_lib"/>
10079                 </update>
10080                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10081                     <context link="fieldset" field="owning_lib"/>
10082                 </delete>
10083                         </actions>
10084                 </permacrud>
10085         </class>
10086
10087     <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">
10088         <fields>
10089             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10090             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10091             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10092         </fields>
10093                 <links>
10094                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10095                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10096                 </links>
10097     </class>
10098
10099     <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">
10100         <fields>
10101             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10102             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
10103         </fields>
10104                 <links>
10105                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10106                 </links>
10107     </class>
10108
10109     <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">
10110         <fields>
10111             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10112             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10113             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10114         </fields>
10115                 <links>
10116                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10117                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10118                 </links>
10119     </class>
10120
10121     <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">
10122         <fields>
10123             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10124             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
10125         </fields>
10126                 <links>
10127                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10128                 </links>
10129     </class>
10130
10131     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
10132                 <oils_persist:source_definition>
10133
10134             SELECT  DISTINCT l.*
10135               FROM  action.unfulfilled_hold_loops l
10136                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
10137               WHERE l.count = m.max
10138
10139                 </oils_persist:source_definition>
10140         <fields>
10141             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10142             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10143             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10144         </fields>
10145                 <links>
10146                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10147                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10148                 </links>
10149     </class>
10150
10151         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
10152                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
10153                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
10154                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
10155                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
10156                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
10157                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
10158                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
10159                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
10160                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
10161                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
10162                 </fields>
10163                 <links>
10164                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
10165                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
10166                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
10167                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
10168                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
10169                 </links>
10170         </class>
10171
10172         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
10173                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
10174                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
10175                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
10176                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10177                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
10178                 </fields>
10179                 <links>
10180                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
10181                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
10182                 </links>
10183         </class>
10184
10185         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
10186                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
10187                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
10188                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
10189                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
10190                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
10191                 </fields>
10192                 <links>
10193                 </links>
10194         </class>
10195
10196         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
10197                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
10198                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
10199                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
10200                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10201                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
10202                 </fields>
10203                 <links>
10204                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
10205                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
10206                 </links>
10207         </class>
10208         
10209         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
10210                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
10211                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
10212                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
10213                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
10214                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
10215                 </fields>
10216                 <links>
10217                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
10218                 </links>
10219         </class>
10220         
10221         <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">
10222                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
10223                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
10224                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10225                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10226                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
10227                 </fields>
10228                 <links>
10229                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10230                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
10231                 </links>
10232         </class>
10233
10234         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
10235                 <fields oils_persist:primary="name">
10236                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
10237                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
10238                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
10239                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10240                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
10241                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
10242                 </fields>
10243                 <links>
10244                 </links>
10245         </class>
10246
10247         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
10248                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10249                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10250                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
10251                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10252                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10253                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10254                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10255                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10256                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10257                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10258                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10259                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10260                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10261                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10262                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10263                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10264                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10265                 </fields>
10266                 <links>
10267                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10268                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10269                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10270                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10271                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10272                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10273                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10274                 </links>
10275         </class>
10276
10277         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
10278                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
10279                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
10280                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10281                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10282                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
10283                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
10284                 </fields>
10285                 <links>
10286                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10287                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
10288                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
10289                 </links>
10290         </class>
10291
10292         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
10293                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
10294                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
10295                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
10296                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
10297                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
10298                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
10299                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
10300                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10301                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
10302                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10303                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
10304                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
10305                 </fields>
10306                 <links>
10307                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10308                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
10309                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
10310                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
10311                 </links>
10312         </class>
10313
10314         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
10315                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
10316                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
10317                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
10318                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10319                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10320                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
10321                 </fields>
10322                 <links>
10323                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
10324                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
10325                 </links>
10326         </class>
10327
10328         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
10329                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
10330                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
10331                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10332                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10333                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10334                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
10335                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
10336                 </fields>
10337                 <links>
10338                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10339                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10340                 </links>
10341         </class>
10342
10343         <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">
10344                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
10345                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
10346                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
10347                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10348                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
10349                 </fields>
10350                 <links>
10351                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10352                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
10353                 </links>
10354         </class>
10355
10356         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
10357                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10358                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10359                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10360                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10361                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10362                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10363                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10364                 </fields>
10365                 <links>
10366                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10367                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10368                 </links>
10369         </class>
10370
10371         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
10372                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10373                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10374                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10375                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10376                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10377                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
10378                 </fields>
10379                 <links>
10380                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10381                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
10382                 </links>
10383         </class>
10384
10385         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
10386                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10387                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10388                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10389                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10390                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10391                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10392                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10393                 </fields>
10394                 <links>
10395                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10396                 </links>
10397         </class>
10398
10399         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
10400                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10401                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10402                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10403                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10404                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10405                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10406                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10407                 </fields>
10408                 <links>
10409                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10410                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10411                 </links>
10412         </class>
10413
10414         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
10415                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10416                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10417                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10418                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10419                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10420                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10421                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
10422                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10423                 </fields>
10424                 <links>
10425                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10426                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10427                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
10428                 </links>
10429         </class>
10430
10431         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
10432                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10433                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10434                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10435                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10436                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10437                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
10438                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10439                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10440                 </fields>
10441                 <links>
10442                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10443                 </links>
10444         </class>
10445
10446         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
10447                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10448                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10449                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10450                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10451                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10452                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10453                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10454                 </fields>
10455                 <links>
10456                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10457                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10458                 </links>
10459         </class>
10460
10461         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
10462                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10463                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10464                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10465                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10466                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10467                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
10468                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
10469                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10470                 </fields>
10471                 <links>
10472                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10473                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
10474                 </links>
10475         </class>
10476
10477         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
10478                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10479                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10480                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10481                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10482                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10483                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10484                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10485                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10486                 </fields>
10487                 <links>
10488                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10489                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10490                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10491                 </links>
10492         </class>
10493
10494         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
10495                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10496                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10497                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10498                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10499                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10500                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10501                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10502                 </fields>
10503                 <links>
10504                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10505                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10506                 </links>
10507         </class>
10508
10509         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
10510                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10511                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10512                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10513                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10514                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10515                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10516                 </fields>
10517                 <links>
10518                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10519                 </links>
10520         </class>
10521
10522         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
10523                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10524                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10525                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10526                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10527                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10528                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10529                 </fields>
10530                 <links>
10531                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10532                 </links>
10533         </class>
10534
10535         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
10536                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10537                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10538                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10539                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10540                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10541                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
10542                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10543                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10544                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10545                 </fields>
10546                 <links>
10547                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10548                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10549                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10550                 </links>
10551         </class>
10552
10553         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
10554                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10555                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10556                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10557                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10558                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10559                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10560                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10561                 </fields>
10562                 <links>
10563                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10564                 </links>
10565         </class>
10566
10567         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
10568                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10569                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10570                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10571                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10572                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10573                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10574                 </fields>
10575                 <links>
10576                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10577                 </links>
10578         </class>
10579
10580         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10581                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10582                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10583                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10584                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10585                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10586                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10587                 </fields>
10588                 <links>
10589                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10590                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10591                 </links>
10592         </class>
10593
10594         <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">
10595                 <fields oils_persist:primary="id">
10596                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10597                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10598                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10599                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10600                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10601                 </fields>
10602                 <links>
10603                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10604                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10605                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10606                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10607                 </links>
10608         </class>
10609
10610         <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">
10611                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10612                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10613                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10614                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10615                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10616                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10617                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10618                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10619                 </fields>
10620                 <links/>
10621                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10622                         <actions>
10623                                 <retrieve/>
10624                         </actions>
10625                 </permacrud>
10626         </class>
10627
10628         <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">
10629                 <fields oils_persist:primary="ptype_key">
10630                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10631                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10632                 </fields>
10633                 <links/>
10634                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10635                         <actions>
10636                                 <retrieve/>
10637                         </actions>
10638                 </permacrud>
10639         </class>
10640
10641         <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">
10642                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10643                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10644                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10645                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10646                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10647                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10648                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10649                 </fields>
10650                 <links>
10651                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10652                 </links>
10653                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10654                         <actions>
10655                                 <retrieve/>
10656                         </actions>
10657                 </permacrud>
10658         </class>
10659
10660         <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">
10661                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10662                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10663                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10664                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10665                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10666                 </fields>
10667                 <links>
10668                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10669                 </links>
10670                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10671                         <actions>
10672                                 <retrieve/>
10673                         </actions>
10674                 </permacrud>
10675         </class>
10676
10677     <class
10678         id="uvs"
10679         controller="open-ils.cstore open-ils.pcrud"
10680         oils_obj:fieldmapper="url_verify::session"
10681         oils_persist:tablename="url_verify.session"
10682         reporter:label="URL Verification Session"
10683     >
10684         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10685             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10686             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10687                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10688             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10689             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10690             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10691             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10692             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10693             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10694         </fields>
10695
10696         <links>
10697             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10698             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10699             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10700             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10701             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10702         </links>
10703
10704         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10705             <actions>
10706                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10707             </actions>
10708         </permacrud>
10709
10710     </class>
10711
10712     <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">
10713         <oils_persist:source_definition>
10714             SELECT
10715                 cbrebi.id AS id,  -- so we can have a pkey in our view
10716                 uvs.id AS session,
10717                 uvs.owning_lib,
10718                 cbrebi.target_biblio_record_entry
10719             FROM url_verify.session uvs
10720             JOIN container.biblio_record_entry_bucket cbreb
10721                 ON (uvs.container = cbreb.id)
10722             JOIN container.biblio_record_entry_bucket_item cbrebi
10723                 ON (cbrebi.bucket = cbreb.id)
10724         </oils_persist:source_definition>
10725         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10726             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10727             <field reporter:label="Session" name="session" reporter:datatype="link" />
10728             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10729             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10730         </fields>
10731         <links>
10732             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10733             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10734             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10735         </links>
10736         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10737             <actions>
10738                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10739             </actions>
10740         </permacrud>
10741     </class>
10742
10743     <class
10744         id="uvus"
10745         controller="open-ils.cstore open-ils.pcrud"
10746         oils_obj:fieldmapper="url_verify::url_selector"
10747         oils_persist:tablename="url_verify.url_selector"
10748         reporter:label="URL Verification URL Selector"
10749     >
10750         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10751             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10752             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10753                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10754             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10755         </fields>
10756
10757         <links>
10758             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10759             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10760         </links>
10761
10762         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10763             <actions>
10764                 <create permission="URL_VERIFY">
10765                     <context link="session" field="owning_lib"/>
10766                 </create>
10767                 <retrieve permission="URL_VERIFY">
10768                     <context link="session" field="owning_lib"/>
10769                 </retrieve>
10770                 <update permission="URL_VERIFY">
10771                     <context link="session" field="owning_lib"/>
10772                 </update>
10773                 <delete permission="URL_VERIFY">
10774                     <context link="session" field="owning_lib"/>
10775                 </delete>
10776             </actions>
10777         </permacrud>
10778
10779     </class>
10780
10781     <class
10782         id="uvu"
10783         controller="open-ils.cstore open-ils.pcrud"
10784         oils_obj:fieldmapper="url_verify::url"
10785         oils_persist:tablename="url_verify.url"
10786         reporter:label="URL Verification URL"
10787     >
10788         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10789             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10790                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10791                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10792                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10793                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10794             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10795             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10796             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10797             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10798             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10799             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10800             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10801             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10802             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10803             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10804             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10805             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10806             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10807         </fields>
10808
10809         <links>
10810             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10811             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10812             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10813             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10814             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10815         </links>
10816
10817         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10818             <actions>
10819                 <create permission="URL_VERIFY">
10820                     <context link="session" field="owning_lib"/>
10821                 </create>
10822                 <retrieve permission="URL_VERIFY">
10823                     <context link="session" field="owning_lib"/>
10824                 </retrieve>
10825                 <update permission="URL_VERIFY">
10826                     <context link="session" field="owning_lib"/>
10827                 </update>
10828                 <delete permission="URL_VERIFY">
10829                     <context link="session" field="owning_lib"/>
10830                 </delete>
10831             </actions>
10832         </permacrud>
10833
10834     </class>
10835
10836     <class
10837         id="uvva"
10838         controller="open-ils.cstore open-ils.pcrud"
10839         oils_obj:fieldmapper="url_verify::verification_attempt"
10840         oils_persist:tablename="url_verify.verification_attempt"
10841         reporter:label="URL Verification Attempt"
10842     >
10843         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10844             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10845                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10846                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10847             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10848             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10849         </fields>
10850
10851         <links>
10852             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10853             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10854         </links>
10855
10856         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10857             <actions>
10858                 <create permission="URL_VERIFY">
10859                     <context link="session" field="owning_lib"/>
10860                 </create>
10861                 <retrieve permission="URL_VERIFY">
10862                     <context link="session" field="owning_lib"/>
10863                 </retrieve>
10864                 <update permission="URL_VERIFY">
10865                     <context link="session" field="owning_lib"/>
10866                 </update>
10867                 <delete permission="URL_VERIFY">
10868                     <context link="session" field="owning_lib"/>
10869                 </delete>
10870             </actions>
10871         </permacrud>
10872
10873     </class>
10874
10875     <class
10876         id="uvuv"
10877         controller="open-ils.cstore open-ils.pcrud"
10878         oils_obj:fieldmapper="url_verify::url_verification"
10879         oils_persist:tablename="url_verify.url_verification"
10880         reporter:label="URL Verification"
10881     >
10882         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10883             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10884                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10885                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10886             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10887             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10888             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10889             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10890                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10891         </fields>
10892
10893         <links>
10894             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10895             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10896             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10897         </links>
10898
10899         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10900             <actions>
10901                 <create permission="URL_VERIFY">
10902                     <context link="attempt" jump="session" field="owning_lib"/>
10903                 </create>
10904                 <retrieve permission="URL_VERIFY">
10905                     <context link="attempt" jump="session" field="owning_lib"/>
10906                 </retrieve>
10907                 <update permission="URL_VERIFY">
10908                     <context link="attempt" jump="session" field="owning_lib"/>
10909                 </update>
10910                 <delete permission="URL_VERIFY">
10911                     <context link="attempt" jump="session" field="owning_lib"/>
10912                 </delete>
10913             </actions>
10914         </permacrud>
10915
10916     </class>
10917
10918         <class
10919                 id="cfdi"
10920                 controller="open-ils.cstore open-ils.pcrud"
10921                 oils_obj:fieldmapper="config::filter_dialog_interface"
10922                 oils_persist:tablename="config.filter_dialog_interface"
10923                 reporter:label="FilterDialog Interface">
10924                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10925                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10926                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10927                 </fields>
10928                 <links>
10929                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10930                 </links>
10931                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10932                         <actions>
10933                                 <retrieve />
10934                         </actions>
10935                 </permacrud>
10936         </class>
10937
10938         <class
10939                 id="cfdfs"
10940                 controller="open-ils.cstore open-ils.pcrud"
10941                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10942                 oils_persist:tablename="config.filter_dialog_filter_set"
10943                 reporter:label="FilterDialog Filter Set">
10944                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10945                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10946                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10947                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10948                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10949                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10950                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10951                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10952                 </fields>
10953                 <links>
10954                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10955                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10956                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10957                 </links>
10958                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10959                         <actions>
10960                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10961                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10962                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10963                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10964                         </actions>
10965                 </permacrud>
10966
10967         </class>
10968
10969         <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">
10970                 <fields oils_persist:primary="code">
10971                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10972                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10973                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10974                 </fields>
10975                 <links/>
10976                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10977                         <actions>
10978                                 <retrieve/>
10979                         </actions>
10980                 </permacrud>
10981         </class>
10982
10983         <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">
10984                 <oils_persist:source_definition>
10985
10986             SELECT  b.id,
10987                     MAX(dcp.edit_date) AS last_delete_date
10988              FROM   biblio.record_entry b
10989                     JOIN asset.call_number cn ON (cn.record = b.id)
10990                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10991              WHERE  NOT b.deleted
10992              GROUP BY b.id
10993              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10994
10995                 </oils_persist:source_definition>
10996                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10997                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10998                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10999                 </fields>
11000                 <links>
11001                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11002                 </links>
11003                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11004                         <actions>
11005                                 <retrieve/>
11006                         </actions>
11007                 </permacrud>
11008         </class>
11009
11010         <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">
11011                 <oils_persist:source_definition>
11012
11013             -- -- 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.
11014             -- -- 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
11015             -- -- may not.
11016             -- SELECT
11017             --     bre.id AS bib_id,
11018             --     COALESCE( z.copy_count, 0 ) AS copy_count,
11019             --     COALESCE( z.hold_count, 0 ) AS hold_count,
11020             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
11021             -- FROM (
11022                 SELECT
11023                     y.bre AS id,
11024                     COALESCE( x.copy_count, 0 ) AS copy_count,
11025                     y.hold_count AS hold_count,
11026                     (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
11027                 FROM (
11028                         SELECT
11029                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
11030                             COUNT(*) AS hold_count
11031                         FROM action.hold_request h
11032                         WHERE
11033                             cancel_time IS NULL
11034                             AND fulfillment_time IS NULL
11035                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
11036                         GROUP BY 1
11037                     )y LEFT JOIN (
11038                         SELECT 
11039                             (SELECT id
11040                                 FROM biblio.record_entry 
11041                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
11042                             ) AS bre, 
11043                             COUNT(*) AS copy_count
11044                         FROM asset.copy
11045                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
11046                         WHERE copy.holdable 
11047                             AND NOT copy.deleted 
11048                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
11049                         GROUP BY 1
11050                     )x ON x.bre = y.bre
11051                 -- )z RIGHT JOIN (
11052                 --     SELECT id
11053                 --     FROM biblio.record_entry
11054                 --     WHERE NOT deleted
11055                 -- )bre ON (z.bib_id = bre.id)
11056                 
11057
11058                 </oils_persist:source_definition>
11059                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11060                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11061                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
11062                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
11063                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
11064                 </fields>
11065                 <links>
11066                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11067                 </links>
11068                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11069                         <actions>
11070                                 <retrieve/>
11071                         </actions>
11072                 </permacrud>
11073         </class>
11074
11075         <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">
11076                 <oils_persist:source_definition>
11077             SELECT *,
11078                 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,
11079                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
11080             FROM
11081                 (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
11082                     FROM
11083                         action.hold_request ahr
11084                         JOIN reporter.hold_request_record rhrr USING (id)
11085                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11086                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
11087                     WHERE
11088                         ahr.cancel_time IS NULL
11089                         AND ahr.fulfillment_time IS NULL
11090                     GROUP BY bib_record, pickup_lib
11091                 )x
11092                 JOIN
11093                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11094                     FROM
11095                         action.hold_request ahr
11096                         JOIN reporter.hold_request_record rhrr USING (id)
11097                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11098                     WHERE
11099                         ahr.cancel_time IS NULL
11100                         AND ahr.fulfillment_time IS NULL
11101                     GROUP BY bib_record
11102                 )y
11103                 USING (id)
11104                 </oils_persist:source_definition>
11105                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11106                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11107                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
11108                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
11109                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
11110                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11111                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11112                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
11113                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11114                 </fields>
11115                 <links>
11116                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11117                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
11118                 </links>
11119                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11120                         <actions>
11121                                 <retrieve/>
11122                         </actions>
11123                 </permacrud>
11124         </class>
11125
11126         <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) ">
11127                 <oils_persist:source_definition>
11128             WITH counts_at_ou AS (
11129                 SELECT  rhrr.bib_record AS id,
11130                         aou.id AS pickup_lib_or_desc,
11131                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
11132                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
11133                   FROM  actor.org_unit aou
11134                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
11135                         action.hold_request ahr
11136                         JOIN reporter.hold_request_record rhrr USING (id)
11137                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11138                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
11139                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
11140                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
11141                         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
11142                   GROUP BY 1, 2
11143             )
11144             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
11145                    y.holds_everywhere, y.copy_count_everywhere,
11146                 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,
11147                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
11148             FROM counts_at_ou x
11149                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11150                     FROM
11151                         action.hold_request ahr
11152                         JOIN reporter.hold_request_record rhrr USING (id)
11153                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11154                     WHERE
11155                         ahr.cancel_time IS NULL
11156                         AND ahr.fulfillment_time IS NULL
11157                     GROUP BY bib_record
11158                 )y
11159                 USING (id)
11160                 </oils_persist:source_definition>
11161                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11162                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11163                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
11164                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
11165                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
11166                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11167                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11168                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
11169                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11170                 </fields>
11171                 <links>
11172                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11173                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
11174                 </links>
11175                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11176                         <actions>
11177                                 <retrieve/>
11178                         </actions>
11179                 </permacrud>
11180         </class>
11181
11182         <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">
11183                 <oils_persist:source_definition>
11184             SELECT
11185                 ac.id,
11186                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
11187                 MAX(actac.xact_start) AS last_circ
11188             FROM asset.copy ac
11189                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11190             GROUP BY ac.id
11191
11192             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
11193             --SELECT
11194             --    ac.id,
11195             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
11196             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
11197             --FROM asset.copy ac
11198             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
11199             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
11200             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
11201                 </oils_persist:source_definition>
11202                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11203                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
11204                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
11205                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
11206                 </fields>
11207                 <links>
11208                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11209                 </links>
11210                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11211                         <actions>
11212                                 <retrieve/>
11213                         </actions>
11214                 </permacrud>
11215         </class>
11216
11217         <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">
11218                 <fields oils_persist:primary="id">
11219                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
11220                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
11221                 </fields>
11222                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11223                         <actions>
11224                                 <retrieve/>
11225                         </actions>
11226                 </permacrud>
11227         </class>
11228
11229         <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">
11230                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
11231                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11232                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
11233                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11234                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11235                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11236                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11237                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11238                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
11239                 </fields>
11240                 <links>
11241                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
11242                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11243                 </links>
11244                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11245                         <actions>
11246                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11247                                 <retrieve/>
11248                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11249                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11250                         </actions>
11251                 </permacrud>
11252         </class>
11253
11254         <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">
11255                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
11256                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
11257                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
11258                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
11259                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
11260                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
11261                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
11262                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
11263                 </fields>
11264                 <links>
11265                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
11266                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
11267                 </links>
11268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11269                         <actions>
11270                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11271                                 <retrieve/>
11272                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11273                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
11274                         </actions>
11275                 </permacrud>
11276         </class>
11277
11278
11279         <!-- ********************************************************************************************************************* -->
11280         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
11281         <!-- ********************************************************************************************************************* -->
11282         <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">
11283                 <fields oils_persist:primary="id">
11284                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
11285                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
11286                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
11287                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11288                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
11289                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
11290                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11291                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
11292                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
11293                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
11294                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
11295                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
11296                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
11297                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
11298                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11299                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
11300                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
11301                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
11302                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
11303                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
11304                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
11305                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
11306                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
11307                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
11308                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
11309                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
11310                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
11311                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
11312                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
11313                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11314                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11315                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11316                 </fields>
11317                 <links>
11318                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11319                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
11320                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
11321                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
11322                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
11323                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
11324                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
11325                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
11326                 </links>
11327         </class>
11328
11329         <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">
11330                 <fields oils_persist:primary="id">
11331                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11332                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11333                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11334                 </fields>
11335                 <links>
11336                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11337                 </links>
11338         </class>
11339
11340         <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">
11341                 <fields oils_persist:primary="id">
11342                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
11343                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
11344                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11345                 </fields>
11346                 <links>
11347                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11348                 </links>
11349         </class>
11350
11351         <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">
11352                 <fields oils_persist:primary="id">
11353                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
11354
11355                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
11356                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
11357                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
11358
11359                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
11360                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
11361                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
11362
11363                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
11364                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
11365
11366                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
11367                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
11368                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
11369
11370                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
11371                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
11372
11373                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
11374                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
11375                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
11376
11377                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
11378                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
11379                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
11380
11381                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
11382                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
11383                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
11384                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
11385
11386                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
11387                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
11388
11389                 </fields>
11390                 <links>
11391                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
11392                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11393                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
11394                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
11395                 </links>
11396         </class>
11397
11398         <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">
11399                 <oils_persist:source_definition>
11400
11401             SELECT
11402                 po.ordering_agency AS ordering_agency,
11403                 po.id AS purchase_order,
11404                 li.id AS lineitem,
11405                 lid.id AS lineitem_detail,
11406                 cpa.id AS claim_policy_action
11407             FROM
11408                 acq.lineitem_detail lid
11409                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
11410                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
11411                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
11412                 JOIN acq.claim_policy_action cpa ON (
11413                     cpa.claim_policy = cp.id
11414
11415                     -- we only care about claim policy actions whose claim
11416                     -- interval we'd reached or exceeded
11417                     AND (NOW() - cpa.action_interval) &gt; po.order_date
11418
11419                     -- filter out all claim policy actions where claim events
11420                     -- have occurred on or after the action's action_interval
11421                     AND NOT EXISTS (
11422                         SELECT 1
11423                         FROM
11424                             acq.claim_event evt
11425                             JOIN acq.claim claim ON (
11426                                 claim.id = evt.claim
11427                                 AND claim.lineitem_detail = lid.id
11428                             )
11429                         WHERE
11430                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
11431                     )
11432                 )
11433             WHERE
11434                 lid.cancel_reason IS NULL
11435                 AND li.cancel_reason IS NULL -- belt/suspenders
11436                 AND po.cancel_reason IS NULL -- belt/suspenders
11437                 AND lid.recv_time IS NULL
11438                 AND po.state = 'on-order'
11439             ORDER BY 1, 2, 3, 4, 5
11440
11441                 </oils_persist:source_definition>
11442                 <fields>
11443                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
11444                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
11445                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11446                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
11447                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
11448                 </fields>
11449                 <links>
11450                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
11451                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
11452                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11453                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
11454                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
11455                 </links>
11456         </class>
11457         <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">
11458                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11459                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11460                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11461                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11462                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11463                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11464                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11465                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11466                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11467                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11468                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11469                 </fields>
11470                 <links>
11471                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11472                 </links>
11473     </class>
11474         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
11475                 <oils_persist:source_definition>
11476             SELECT * FROM acq.lineitem_summary 
11477                                 WHERE item_count > (invoice_count + cancel_count)
11478         </oils_persist:source_definition>
11479                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
11480                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
11481                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
11482                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
11483                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
11484                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
11485                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
11486                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
11487                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
11488                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
11489                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
11490                 </fields>
11491                 <links>
11492                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
11493                 </links>
11494     </class>
11495         <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">
11496                 <oils_persist:source_definition>
11497
11498                         SELECT  t.*
11499                           FROM  action.transit_copy t
11500                                 JOIN actor.org_unit AS s ON (t.source = s.id)
11501                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
11502                           WHERE s.parent_ou &lt;&gt; d.parent_ou
11503
11504                 </oils_persist:source_definition>
11505                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
11506                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
11507                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
11508                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
11509                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
11510                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
11511                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
11512                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
11513                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
11514                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
11515                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
11516                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
11517                 </fields>
11518                 <links>
11519                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
11520                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
11521                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
11522                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
11523                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11524                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
11525                 </links>
11526         </class>
11527
11528     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
11529                 <oils_persist:source_definition>
11530
11531         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
11532                 SELECT
11533                         cp.id as copy,
11534                         COUNT(circ.id),
11535                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11536                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11537                 FROM
11538                         asset.copy cp
11539                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
11540                 GROUP BY 1, 3, 4
11541                 UNION ALL
11542                 SELECT
11543                         cp.id as copy,
11544                         COUNT(circ.id),
11545                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11546                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11547                 FROM
11548                         asset.copy cp
11549                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
11550                 GROUP BY 1, 3, 4
11551                 UNION ALL
11552                 SELECT
11553                         id as copy,
11554                         circ_count,
11555                         -1 AS year,
11556                         false as is_renewal
11557                 FROM
11558                         extend_reporter.legacy_circ_count
11559         )x GROUP BY 1, 3, 4
11560
11561                 </oils_persist:source_definition>
11562         <fields>
11563             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
11564             <field reporter:label="Count" name="count" reporter:datatype="int"/>
11565             <field reporter:label="Year" name="year" reporter:datatype="int"/>
11566             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
11567         </fields>
11568                 <links>
11569                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11570                 </links>
11571                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11572                         <actions>
11573                                 <retrieve/>
11574                         </actions>
11575                 </permacrud>
11576     </class>
11577
11578         <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">
11579                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
11580                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
11581                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
11582                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
11583                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
11584                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
11585                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
11586                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
11587                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
11588                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
11589                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
11590                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
11591                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
11592                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
11593                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
11594                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
11595                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
11596                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
11597                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
11598                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
11599                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
11600                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
11601                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
11602                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
11603                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
11604                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
11605                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
11606                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
11607                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
11608                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
11609                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
11610                 </fields>
11611                 <links>
11612                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
11613                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
11614                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
11615                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11616                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
11617                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11618                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11619                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
11620                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
11621                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
11622                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
11623                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
11624                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
11625                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
11626                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
11627                 </links>
11628         </class>
11629
11630     <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">
11631         <fields oils_persist:primary="id">
11632             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11633             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11634             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11635             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11636             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11637             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11638             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11639             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11640             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11641             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11642             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11643             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11644             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11645             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11646             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11647             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11648             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11649             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11650             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11651             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11652             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11653             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11654             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11655             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11656             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11657             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11658             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11659             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11660             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11661             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11662             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11663             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11664             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11665             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11666         </fields>
11667         <links>
11668             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11669             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11670             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11671             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11672             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11673             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11674             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11675             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11676         </links>
11677     </class>
11678
11679     <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">
11680         <fields oils_persist:primary="id">
11681             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11682             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11683             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11684             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11685         </fields>
11686         <links>
11687             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11688             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11689         </links>
11690     </class>
11691
11692     <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">
11693         <fields oils_persist:primary="owning_lib">
11694             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11695             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11696             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11697         </fields>
11698         <links>
11699             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11700         </links>
11701     </class>
11702
11703     <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">
11704         <fields oils_persist:primary="id">
11705             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11706             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11707             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11708             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11709             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11710         </fields>
11711         <links>
11712             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11713             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11714             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11715         </links>
11716     </class>
11717
11718     <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">
11719         <fields oils_persist:primary="circ_lib">
11720             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11721             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11722             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11723             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11724         </fields>
11725         <links>
11726             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11727             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11728         </links>
11729     </class>
11730
11731     <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">
11732         <fields oils_persist:primary="id">
11733             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11734             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11735             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11736             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11737             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11738         </fields>
11739         <links>
11740             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11741             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11742             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11743         </links>
11744     </class>
11745
11746     <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">
11747         <fields oils_persist:primary="home_ou">
11748             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11749             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11750             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11751             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11752         </fields>
11753         <links>
11754             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11755             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11756         </links>
11757     </class>
11758         <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">
11759                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11760                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11761                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11762                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11763                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11764                 </fields>
11765                 <links>
11766                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11767                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11768                 </links>
11769                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11770                         <actions>
11771                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11772                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11773                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11774                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11775                         </actions>
11776                 </permacrud>
11777         </class>
11778         <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">
11779                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11780                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11781                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11782                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11783                 </fields>
11784                 <links>
11785                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11786                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11787                         </links>
11788                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11789                 <actions>
11790                                 <create permission="ADMIN_ACQ_FUND_TAG">
11791                                         <context link="tag" field="owner"/>
11792                                 </create>
11793                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11794                                         <context link="tag" field="owner"/>
11795                                 </retrieve>
11796                                 <update permission="ADMIN_ACQ_FUND_TAG">
11797                                         <context link="tag" field="owner"/>
11798                                 </update>
11799                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11800                                         <context link="tag" field="owner"/>
11801                                 </delete>
11802                         </actions>
11803                 </permacrud>
11804         </class>
11805         <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">
11806                 <oils_persist:source_definition><![CDATA[
11807                 SELECT
11808                         poi.purchase_order AS purchase_order,
11809                         ii.invoice AS invoice,
11810                         NULL AS lineitem,
11811                         poi.id AS po_item,
11812                         NULL AS picklist
11813                 FROM
11814                         acq.po_item poi
11815                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11816                 UNION SELECT
11817                         jub.purchase_order AS purchase_order,
11818                         ie.invoice AS invoice,
11819                         jub.id AS lineitem,
11820                         NULL AS po_item,
11821                         jub.picklist AS picklist
11822                 FROM
11823                         acq.lineitem jub
11824                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11825                 UNION SELECT
11826                         ii.purchase_order AS purchase_order,
11827                         ii.invoice AS invoice,
11828                         NULL AS lineitem,
11829                         NULL AS po_item,
11830                         NULL AS picklist
11831                 FROM
11832                         acq.invoice_item ii
11833                 WHERE ii.po_item IS NULL
11834                 UNION SELECT
11835                         ie.purchase_order AS purchase_order,
11836                         ie.invoice AS invoice,
11837                         NULL AS lineitem,
11838                         NULL AS po_item,
11839                         NULL AS picklist
11840                 FROM
11841                         acq.invoice_entry ie
11842                 WHERE ie.lineitem IS NULL
11843                 UNION SELECT
11844                         NULL AS purchase_order,
11845                         NULL AS invoice,
11846                         jub.id AS lineitem,
11847                         NULL AS po_item,
11848                         jub.picklist AS picklist
11849                 FROM
11850                         acq.lineitem jub
11851                 WHERE jub.purchase_order IS NULL
11852                 ]]></oils_persist:source_definition>
11853                 <fields>
11854                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11855                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11856                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11857                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11858                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11859                 </fields>
11860                 <links>
11861                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11862                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11863                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11864                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11865                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11866                 </links>
11867         </class>
11868         <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">
11869                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11870                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11871                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11872                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11873                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11874                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11875                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11876                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11877                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11878                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11879                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11880                 </fields>
11881                 <links>
11882                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11883                 </links>
11884                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11885                         <actions>
11886                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11887                                 <retrieve/>
11888                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11889                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11890                         </actions>
11891                 </permacrud>
11892         </class>
11893
11894         <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">
11895                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11896                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11897                         <field name="date_applied" reporter:datatype="timestamp"/>
11898                         <field name="org" reporter:datatype="org_unit"/>
11899                         <field name="original_value" reporter:datatype="text"/>
11900                         <field name="new_value" reporter:datatype="text"/>
11901                         <field name="field_name" reporter:datatype="link"/>
11902                 </fields>
11903                 <links>
11904                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11905                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11906                 </links>
11907                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11908                         <actions>
11909                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11910                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11911                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11912                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11913                         </actions>
11914                 </permacrud>
11915         </class>
11916         <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">
11917                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11918                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11919                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11920                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11921                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11922                 </fields>
11923                 <links>
11924                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11925                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11926                 </links>
11927         </class>
11928         <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">
11929                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11930                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11931                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11932                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11933                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11934                 </fields>
11935                 <links>
11936                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11937                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11938                 </links>
11939         </class>
11940         <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">
11941                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11942                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
11943                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11944                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11945                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11946                 </fields>
11947                 <links>
11948                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11949                 </links>
11950                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11951                         <actions>
11952                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11953                                 <retrieve/>
11954                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11955                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11956                         </actions>
11957                 </permacrud>
11958         </class>
11959         <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">
11960                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11961                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11962                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11963                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11964                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11965                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11966                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11967                 </fields>
11968                 <links>
11969                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11970                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11971                 </links>
11972                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11973                         <actions>
11974                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11975                                 <retrieve/>
11976                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11977                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11978                         </actions>
11979                 </permacrud>
11980         </class>
11981         <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">
11982                 <fields oils_persist:primary="code">
11983                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
11984                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
11985                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
11986                 </fields>
11987                 <links>
11988                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11989                 </links>
11990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11991                         <actions>
11992                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
11993                                 <retrieve/>
11994                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
11995                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
11996                         </actions>
11997                 </permacrud>
11998         </class>
11999         <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">
12000                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
12001                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12002                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
12003                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12004                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12005                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
12006                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
12007                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12008                 </fields>
12009                 <links>
12010                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
12011                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12012                 </links>
12013                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12014                         <actions>
12015                                 <create permission="ADMIN_COPY_TAGS" context_field="owner"/>
12016                                 <retrieve/>
12017                                 <update permission="ADMIN_COPY_TAGS" context_field="owner"/>
12018                                 <delete permission="ADMIN_COPY_TAGS" context_field="owner"/>
12019                         </actions>
12020                 </permacrud>
12021         </class>
12022         <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">
12023                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
12024                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12025                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
12026                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
12027                 </fields>
12028                 <links>
12029                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12030                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
12031                 </links>
12032                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12033                         <actions>
12034                                 <create permission="UPDATE_COPY">
12035                     <context link="copy" field="circ_lib"/>
12036                 </create>
12037                                 <retrieve/>
12038                                 <update permission="UPDATE_COPY">
12039                     <context link="copy" field="circ_lib"/>
12040                 </update>
12041                                 <delete permission="UPDATE_COPY">
12042                     <context link="copy" field="circ_lib"/>
12043                 </delete>
12044                         </actions>
12045                 </permacrud>
12046         </class>
12047         <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">
12048         <oils_persist:source_definition>
12049         SELECT ahcm.target_copy AS id,count(*) AS count
12050          FROM
12051          action.hold_request ahr,
12052          action.hold_copy_map ahcm
12053          WHERE
12054          ahr.cancel_time IS NULL AND
12055          ahr.fulfillment_time IS NULL AND
12056          ahr.capture_time IS NULL AND
12057          ahr.id = ahcm.hold
12058          GROUP BY ahcm.target_copy
12059         </oils_persist:source_definition>
12060         <fields oils_persist:primary="id">
12061             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12062             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
12063         </fields>
12064         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12065             <actions>
12066                <retrieve/>
12067             </actions>
12068         </permacrud>
12069         </class>
12070
12071         <!-- ********************************************************************************************************************* -->
12072
12073 </IDL>
12074
12075 <!--
12076     vim:noet:ts=4:sw=4:
12077 -->