]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
9a877b692eb3e6880614b1894b1d5e390a60b26b
[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                         <field name="debit_card_payment" oils_persist:virtual="true" />
98                 </fields>
99                 <links>
100                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
101                 </links>
102         </class>
103
104         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
105                 <fields>
106                         <field name="id" oils_persist:virtual="true" />
107                         <field name="children" oils_persist:virtual="true" />
108                         <field name="owner_doc" oils_persist:virtual="true" />
109                         <field name="intra_doc_id" oils_persist:virtual="true" />
110                         <field name="parent_node" oils_persist:virtual="true" />
111                         <field name="node_type" oils_persist:virtual="true" />
112                         <field name="namespace_uri" oils_persist:virtual="true" />
113                         <field name="name" oils_persist:virtual="true" />
114                         <field name="value" oils_persist:virtual="true" />
115                 </fields>
116         </class>
117
118         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
119                 <fields>
120                         <field name="title" oils_persist:virtual="true" />
121                         <field name="author" oils_persist:virtual="true" />
122                         <field name="doc_id" oils_persist:virtual="true" />
123                         <field name="doc_type" oils_persist:virtual="true" />
124                         <field name="pubdate" oils_persist:virtual="true" />
125                         <field name="isbn" oils_persist:virtual="true" />
126                         <field name="publisher" oils_persist:virtual="true" />
127                         <field name="tcn" oils_persist:virtual="true" />
128                         <field name="subject" oils_persist:virtual="true" />
129                         <field name="types_of_resource" oils_persist:virtual="true" />
130                         <field name="call_numbers" oils_persist:virtual="true" />
131                         <field name="edition" oils_persist:virtual="true" />
132                         <field name="online_loc" oils_persist:virtual="true" />
133                         <field name="synopsis" oils_persist:virtual="true" />
134                         <field name="physical_description" oils_persist:virtual="true" />
135                         <field name="toc" oils_persist:virtual="true" />
136                         <field name="copy_count" oils_persist:virtual="true" />
137                         <field name="series" oils_persist:virtual="true" />
138                         <field name="serials" oils_persist:virtual="true" />
139                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
140                 </fields>
141         </class>
142
143         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
144                 <fields>
145                         <field name="err_msg" oils_persist:virtual="true" />
146                         <field name="type" oils_persist:virtual="true" />
147                 </fields>
148         </class>
149
150         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
151                 <fields>
152                         <field name="err_msg" oils_persist:virtual="true" />
153                         <field name="type" oils_persist:virtual="true" />
154                 </fields>
155         </class>
156
157         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
158                 <fields oils_persist:primary="matchpoint">
159                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
160                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
161                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
162                 </fields>
163                 <links>
164                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
165                 </links>
166         </class>
167
168         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
169         <!-- when the time is right, turn me into a view.  -->
170                 <fields>
171             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
172             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
173             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
174             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
175             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
176             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
177             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
179             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
180             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
181                 </fields>
182         </class>
183
184         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
185                 <fields>
186                         <field name="public_name" oils_persist:virtual="true" />
187                         <field name="target_url" oils_persist:virtual="true" />
188                         <field name="target_coverage" oils_persist:virtual="true" />
189                         <field name="target_embargo" oils_persist:virtual="true" />
190                 </fields>
191         </class>
192
193         <!-- Actually in the DB -->
194         <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">
195                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
196                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
197                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
198                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
199                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
200                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
201                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
202                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
203                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
204                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
205                 </fields>
206                 <links>
207                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
208                 </links>
209                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
210                         <actions>
211                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
212                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
213                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
214                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
215                         </actions>
216                 </permacrud>
217         </class>
218
219         <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">
220                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
221                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
222                         <field reporter:label="Group" name="grp" reporter:datatype="link" config_field="true"/>
223                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
224                 </fields>
225                 <links>
226                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
227                 </links>
228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
229                         <actions>
230                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
231                     <context link="grp" field="owner"/>
232                 </create>
233                                 <retrieve/>
234                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
235                     <context link="grp" field="owner"/>
236                 </update>
237                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
238                     <context link="grp" field="owner"/>
239                 </delete>
240                         </actions>
241                 </permacrud>
242         </class>
243
244         <class  id="rrbs" 
245             controller="open-ils.cstore open-ils.pcrud" 
246             oils_obj:fieldmapper="rating::record_badge_score" 
247             oils_persist:tablename="rating.record_badge_score" 
248             reporter:label="Statistical Popularity Badge">
249                 <fields oils_persist:primary="id" 
250                 oils_persist:sequence="rating.record_badge_score_id_seq">
251                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
252                         <field reporter:label="Badge" name="badge" reporter:datatype="link"/>
253                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
254                         <field reporter:label="Score" name="score" reporter:datatype="int"/>
255                 </fields>
256         <links>
257             <link field="badge" reltype="has_a" key="id" map="" class="rb"/>
258             <link field="record" reltype="has_a" key="id" map="" class="bre"/>
259         </links>
260                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
261                         <actions>
262                                 <retrieve/>
263                         </actions>
264                 </permacrud>
265         </class>
266
267         <class  id="rp" 
268             controller="open-ils.cstore open-ils.pcrud" 
269             oils_obj:fieldmapper="rating::popularity_parameter" 
270             oils_persist:tablename="rating.popularity_parameter" 
271             reporter:label="Statistical Popularity Parameter">
272                 <fields oils_persist:primary="id" 
273                 oils_persist:sequence="rating.popularity_parameter_id_seq">
274                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
275                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
276                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
277                         <field reporter:label="Population Function" name="func" reporter:datatype="text"/>
278                         <field reporter:label="Require Horizon" name="require_horizon" reporter:datatype="bool"/>
279                         <field reporter:label="Require Percentile" name="require_percentile" reporter:datatype="bool"/>
280                         <field reporter:label="Require Importance" name="require_importance" reporter:datatype="bool"/>
281                 </fields>
282                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
283                         <actions>
284                                 <create permission="CREATE_POP_PARAMETER" global_required="true"/>
285                                 <retrieve/>
286                                 <update permission="UPDATE_POP_PARAMETER" global_required="true"/>
287                                 <delete permission="DELETE_POP_PARAMETER" global_required="true"/>
288                         </actions>
289                 </permacrud>
290         </class>
291
292         <class  id="rb" 
293             controller="open-ils.cstore open-ils.pcrud" 
294             oils_obj:fieldmapper="rating::badge" 
295             oils_persist:tablename="rating.badge" 
296             reporter:label="Statistical Popularity Badge">
297                 <fields oils_persist:primary="id" 
298                 oils_persist:sequence="rating.badge_id_seq">
299                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
300                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
301                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
302                         <field reporter:label="Scope" name="scope" reporter:datatype="org_unit"/>
303                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
304                         <field reporter:label="Age Horizon" name="horizon_age" reporter:datatype="text"/>
305                         <field reporter:label="Importance Horizon" name="importance_age" reporter:datatype="text"/>
306                         <field reporter:label="Importance Interval" name="importance_interval" reporter:datatype="text"/>
307                         <field reporter:label="Importance Scale" name="importance_scale" reporter:datatype="text"/>
308                         <field reporter:label="Percentile" name="percentile" reporter:datatype="float"/>
309                         <field reporter:label="Attribute Filter" name="attr_filter" reporter:datatype="text"/>
310                         <field reporter:label="Circ Mod Filter" name="circ_mod_filter" reporter:datatype="link"/>
311                         <field reporter:label="Bib Source Filter" name="src_filter" reporter:datatype="link"/>
312                         <field reporter:label="Location Group Filter" name="loc_grp_filter" reporter:datatype="link"/>
313                         <field reporter:label="Recalculation Interval" name="recalc_interval" reporter:datatype="text"/>
314                         <field reporter:label="Fixed Rating" name="fixed_rating" reporter:datatype="int"/>
315                         <field reporter:label="Discard Value Count" name="discard" reporter:datatype="int"/>
316                         <field reporter:label="Last Refresh Time" name="last_calc" reporter:datatype="timestamp"/>
317                         <field reporter:label="Popularity Parameter" name="popularity_parameter" reporter:datatype="link"/>
318                 </fields>
319                 <links>
320                         <link field="scope" reltype="has_a" key="id" map="" class="aou"/>
321                         <link field="popularity_parameter" reltype="has_a" key="id" map="" class="rp"/>
322                         <link field="src_filter" reltype="has_a" key="id" map="" class="cbs"/>
323                         <link field="circ_mod_filter" reltype="has_a" key="code" map="" class="ccm"/>
324                         <link field="loc_grp_filter" reltype="has_a" key="id" map="" class="acplg"/>
325                 </links>
326                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
327                         <actions>
328                                 <create permission="CREATE_POP_BADGE" global_required="true"/>
329                                 <retrieve/>
330                                 <update permission="UPDATE_POP_BADGE" global_required="true"/>
331                                 <delete permission="DELETE_POP_BADGE" global_required="true"/>
332                         </actions>
333                 </permacrud>
334         </class>
335
336         <class  id="vibtg" 
337             controller="open-ils.cstore open-ils.pcrud" 
338             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
339             oils_persist:tablename="vandelay.import_bib_trash_group" 
340             reporter:label="Import/Overlay Field Groups for Removal">
341                 <fields oils_persist:primary="id" 
342                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
343                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
344                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
345                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
346                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
347                         <field reporter:label="Fields" name="import_bib_trash_fields" oils_persist:virtual="true" reporter:datatype="link" config_field="true"/>
348                 </fields>
349                 <links>
350                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
351                         <link field="import_bib_trash_fields" reltype="has_many" key="grp" map="" class="vibtf"/>
352                 </links>
353                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
354                         <actions>
355                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
356                                 <retrieve/>
357                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
358                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
359                         </actions>
360                 </permacrud>
361         </class>
362
363
364         <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">
365                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
366                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
367                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
368                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
369                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
370                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
371                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
372                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
373                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
374                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
375                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
376                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
377                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
378                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
379                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
380                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
381                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
382                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
383                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
384                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
385                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
386                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
387                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
388                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
389                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
390                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
391                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
392                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
393                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
394                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
395                 </fields>
396                 <links>
397                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
398                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
399                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
400                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
401                 </links>
402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
403                         <actions>
404                                 <create permission="CREATE_IMPORT_ITEM">
405                     <context link="definition" field="owner"/>
406                                 </create>
407                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
408                     <context link="definition" field="owner"/>
409                                 </retrieve>
410                                 <update permission="UPDATE_IMPORT_ITEM">
411                     <context link="definition" field="owner"/>
412                                 </update>
413                                 <delete permission="DELETE_IMPORT_ITEM">
414                     <context link="definition" field="owner"/>
415                                 </delete>
416                         </actions>
417                 </permacrud>
418         </class>
419
420         <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">
421                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
422                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
423                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
424                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
425                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
426                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
427                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
428                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
429                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
430                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
431                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
432                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
433                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
434                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
435                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
436                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
437                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
438                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
439                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
440                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
441                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
442                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
443                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
444                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
445                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
446                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
447                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
448                 </fields>
449                 <links>
450                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
451                 </links>
452                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
453                         <actions>
454                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
455                                 <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"/>
456                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
457                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
458                         </actions>
459                 </permacrud>
460         </class>
461
462         <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">
463                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
464                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
465                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
466                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
467                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
468                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
469                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
470                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
471                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
472                 </fields>
473                 <links>
474                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
475                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
476                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
477                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
478                 </links>
479                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
480                         <actions>
481                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
482                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
483                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
484                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
485                         </actions>
486                 </permacrud>
487         </class>
488
489         <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">
490                 <fields oils_persist:primary="code">
491                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
492                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
493                 </fields>
494                 <links>
495                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
496                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
497                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
498                 </links>
499                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
500                         <actions>
501                                 <retrieve/>
502                         </actions>
503                 </permacrud>
504         </class>
505
506         <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">
507                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
508                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
509                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
510                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
511                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
512                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
513                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
514                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
515                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
516                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
517                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
518                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
519                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
520                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
521                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
522                 </fields>
523                 <links>
524                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
525                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
526                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
527                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
528             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
529             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
530             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
531                 </links>
532                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
533                         <actions>
534                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
535                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
536                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
537                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
538                         </actions>
539                 </permacrud>
540         </class>
541
542         <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">
543                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
544                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
545                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
546                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
547                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
548                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
549                 </fields>
550                 <links/>
551                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
552                         <actions>
553                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
554                 <retrieve/>
555                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
556                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
557                         </actions>
558                 </permacrud>
559         </class>
560
561         <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">
562                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
563                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
564                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
565                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
566                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
567                 </fields>
568                 <links>
569                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
570                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
571                 </links>
572                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
573                         <actions>
574                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
575                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
576                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
577                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
578                         </actions>
579                 </permacrud>
580         </class>
581
582         <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">
583                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
584                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
585                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
586                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
587                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
588                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
589                 </fields>
590                 <links>
591                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
592                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
593                 </links>
594                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
595                         <actions>
596                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
597                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
598                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
599                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
600                         </actions>
601                 </permacrud>
602         </class>
603
604         <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">
605                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
606                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
607                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
608                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
609                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
610                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
611                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
612                 </fields>
613                 <links>
614                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
615                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
616                 </links>
617                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
618                         <actions>
619                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
621                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
622                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
623                         </actions>
624                 </permacrud>
625         </class>
626
627         <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">
628                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
629                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
630                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
631                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
632                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
633                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
634                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
635                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
636                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
637                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
638                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
639                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
640                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
641                 </fields>
642                 <links>
643                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
644                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
645                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
646             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
647             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
648                 </links>
649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
650                         <actions>
651                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
652                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
653                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
654                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
655                         </actions>
656                 </permacrud>
657         </class>
658
659         <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">
660                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
661                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
662                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
663                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
664                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
665                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
666                 </fields>
667                 <links/>
668                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
669                         <actions>
670                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
671                 <retrieve/>
672                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
673                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
674                         </actions>
675                 </permacrud>
676         </class>
677
678         <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">
679                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
680                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
681                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
682                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
683                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
684                 </fields>
685                 <links>
686                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
687                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
688                 </links>
689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
690                         <actions>
691                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
692                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
693                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
694                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
695                         </actions>
696                 </permacrud>
697         </class>
698
699         <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">
700                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
701                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
702                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
703                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
704                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
705                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
706                 </fields>
707                 <links>
708                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
709                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
710                 </links>
711                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
712                         <actions>
713                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
714                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
715                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
716                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
717                         </actions>
718                 </permacrud>
719         </class>
720
721         <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">
722                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
723                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
724                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
725                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
726                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
727                 </fields>
728                 <links>
729                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
730                 </links>
731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
732                         <actions>
733                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
734                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
735                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
736                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
737                         </actions>
738                 </permacrud>
739         </class>
740
741         <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">
742                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
743                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
744                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
745                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
746                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
747                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
748                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
749                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
750             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
751                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
752                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
753                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
754                 </fields>
755                 <links>
756                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
757                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
758                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
759                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
760                 </links>
761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
762                         <actions>
763                                 <create permission="ADMIN_IMPORT_MATCH_SET">
764                     <context link="match_set" field="owner"/>
765                                 </create>
766                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
767                     <context link="match_set" field="owner"/>
768                                 </retrieve>
769                                 <update permission="ADMIN_IMPORT_MATCH_SET">
770                     <context link="match_set" field="owner"/>
771                                 </update>
772                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
773                     <context link="match_set" field="owner"/>
774                                 </delete>
775                         </actions>
776                 </permacrud>
777         </class>
778
779         <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">
780                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
781                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
782                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
783                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
784                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
785                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
786                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
787                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
788                 </fields>
789                 <links>
790                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
791                 </links>
792                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
793                         <actions>
794                                 <create permission="ADMIN_IMPORT_MATCH_SET">
795                     <context link="match_set" field="owner"/>
796                                 </create>
797                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
798                     <context link="match_set" field="owner"/>
799                                 </retrieve>
800                                 <update permission="ADMIN_IMPORT_MATCH_SET">
801                     <context link="match_set" field="owner"/>
802                                 </update>
803                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
804                     <context link="match_set" field="owner"/>
805                                 </delete>
806                         </actions>
807                 </permacrud>
808         </class>
809
810         <class id="vst" controller="open-ils.cstore open-ils.pcrud" 
811                 oils_obj:fieldmapper="vandelay::session_tracker" 
812                 oils_persist:tablename="vandelay.session_tracker" 
813                 reporter:label="Vandelay Session Tracker">
814                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.session_tracker_id_seq">
815                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
816                         <field reporter:label="Session Key" name="session_key" reporter:datatype="text"/>
817                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
818                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
819                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
820                         <field reporter:label="Record Type" name="record_type" reporter:datatype="text"/>
821                         <!-- queue doesn't use datatype 'link' because it may refer to a bib
822                                          queue or an auth queue and there's no IDL class for vandelay.queue .
823                                          parent table.
824                         -->
825                         <field reporter:label="Source Queue" name="queue" reporter:datatype="int"/>
826                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestsamp"/>
827                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestsamp"/>
828                         <field reporter:label="State" name="state" reporter:datatype="text"/>
829                         <field reporter:label="Action Type" name="action_type" reporter:datatype="text"/>
830                         <field reporter:label="Total Actions" name="total_actions" reporter:datatype="int"/>
831                         <field reporter:label="Actions Performed" name="actions_performed" reporter:datatype="int"/>
832                 </fields>
833                 <links>
834                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
835                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
836                 </links>
837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
838                         <actions>
839                                 <!-- created by the API -->
840                                 <retrieve global_required="true"
841                                         permission="CREATE_BIB_IMPORT_QUEUE CREATE_AUTHORITY_IMPORT_QUEUE"/>
842                                 <update global_required="true"
843                                         permission="UPDATE_BIB_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE">
844                                         <context link="workstation" field="owning_lib"/>
845                                 </update>
846                                 <delete 
847                                         permission="DELETE_BIB_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE">
848                                         <context link="workstation" field="owning_lib"/>
849                                 </delete>
850                         </actions>
851                 </permacrud>
852         </class>
853
854         <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">
855                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
856                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
857                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
858                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
859                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
860                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
861                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
862                 </fields>
863                 <links>
864                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
865                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
866                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
867                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
868                 </links>
869         </class>
870
871     <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">
872         <fields oils_persist:primary="name">
873             <field reporter:label="Name" name="name" reporter:datatype="text"/>
874             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
875             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
876             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
877         </fields>
878         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
879             <actions>
880                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
881                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
882                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
883                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
884             </actions>
885         </permacrud>
886     </class>
887
888     <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">
889         <fields oils_persist:primary="id">
890             <field reporter:label="ID" name="id" reporter:datatype="id"/>
891             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
892             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
893             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
894             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
895         </fields>
896         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
897             <actions>
898                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
899                 <retrieve/>
900                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
901                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
902             </actions>
903         </permacrud>
904     </class>
905
906         <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">
907                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
908                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
909                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
910                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
911                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
912                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
913                 </fields>
914                 <links>
915                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
916                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
917                 </links>
918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
919             <actions>
920                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
921                 <retrieve/>
922                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
923                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
924             </actions>
925         </permacrud>
926         </class>
927
928         <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">
929                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_format_id_seq">
930                         <field reporter:label="ID"   name="id" reporter:datatype="id" reporter:selector="name" />
931                         <field reporter:label="Code" name="code" reporter:datatype="text" oils_obj:required="true"/>
932                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
933         </fields>
934         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
935             <actions>
936                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
937                 <retrieve/>
938                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
939                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
940             </actions>
941         </permacrud>
942         </class>
943
944         <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">
945                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_field_id_seq">
946                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
947                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
948                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true" />
949                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
950                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
951                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
952                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
953                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
954                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
955                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
956                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
957         </fields>
958                 <links>
959                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
960                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
961         </links>
962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
963             <actions>
964                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
965                 <retrieve/>
966                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
967                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
968             </actions>
969         </permacrud>
970         </class>
971
972         <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">
973                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
974                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
975                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
976                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" oils_obj:required="true"/>
977                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" oils_obj:required="true"/>
978                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" oils_obj:required="true"/>
979                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
980                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
981                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
982                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
983                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
984         </fields>
985                 <links>
986                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
987                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
988         </links>
989         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
990             <actions>
991                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
992                 <retrieve/>
993                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
994                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
995             </actions>
996         </permacrud>
997         </class>
998
999         <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">
1000                 <fields oils_persist:primary="name">
1001                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
1002                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1003                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1004                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
1005                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
1006                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
1007                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
1008                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
1009                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
1010                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
1011                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
1012                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
1013                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
1014                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
1015                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
1016                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
1017                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
1018                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
1019                 </fields>
1020                 <links>
1021                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
1022                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
1023                 </links>
1024         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1025             <actions>
1026                 <create permission="ADMIN_SVF" global_required="true"/>
1027                 <retrieve/>
1028                 <update permission="ADMIN_SVF" global_required="true"/>
1029                 <delete permission="ADMIN_SVF" global_required="true"/>
1030             </actions>
1031         </permacrud>
1032         </class>
1033
1034         <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">
1035                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
1036                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1037                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
1038                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1039             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
1040                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
1041                 </fields>
1042                 <links/>
1043         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1044             <actions>
1045                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
1046                 <retrieve/>
1047                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
1048                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
1049             </actions>
1050         </permacrud>
1051         </class>
1052
1053         <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">
1054                 <fields oils_persist:primary="coded_value">
1055                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
1056                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
1057                 </fields>
1058                 <links>
1059                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
1060                 </links>
1061         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1062             <actions>
1063                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1064                 <retrieve/>
1065                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1066                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1067             </actions>
1068         </permacrud>
1069         </class>
1070
1071         <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">
1072                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
1073                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1074                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1075                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1076                 </fields>
1077                 <links>
1078                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1079                 </links>
1080         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1081             <actions>
1082                 <retrieve/>
1083             </actions>
1084         </permacrud>
1085         </class>
1086
1087
1088         <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">
1089                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
1090                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1091                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
1092                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1093                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1094                 </fields>
1095                 <links>
1096                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1097                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
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
1107         <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">
1108                 <fields oils_persist:primary="source">
1109                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
1110                         <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 -->
1111                 </fields>
1112                 <links>
1113                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1114                 </links>
1115         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1116             <actions>
1117                 <retrieve/>
1118             </actions>
1119         </permacrud>
1120         </class>
1121
1122         <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">
1123                 <fields>
1124                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1125                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
1126                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
1127                 </fields>
1128                 <links>
1129                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1130                 </links>
1131         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1132             <actions>
1133                 <retrieve/>
1134             </actions>
1135         </permacrud>
1136         </class>
1137
1138         <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">
1139                 <fields oils_persist:primary="id">
1140                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1141                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1142                 </fields>
1143                 <links>
1144                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1145                 </links>
1146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1147             <actions>
1148                 <retrieve/>
1149             </actions>
1150         </permacrud>
1151         </class>
1152
1153         <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">
1154                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1155                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1156                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1157                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1158                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1159                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1160                 </fields>
1161                 <links>
1162                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1163                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1164                 </links>
1165         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1166             <actions>
1167                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1168                 <retrieve/>
1169                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1170                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1171             </actions>
1172         </permacrud>
1173         </class>
1174
1175         <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">
1176                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1177                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1178                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1179                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1180                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1181                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1182                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1183                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1184             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1185             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1186             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1187                 </fields>
1188                 <links>
1189                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1190                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1191                 </links>
1192         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1193             <actions>
1194                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1195                 <retrieve/>
1196                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1197                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1198             </actions>
1199         </permacrud>
1200         </class>
1201
1202         <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">
1203                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1204                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1205                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1206                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1207                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1208                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1209                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1210                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1211                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1212                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1213                 </fields>
1214                 <links>
1215                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1216                 </links>
1217         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1218             <actions>
1219                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1220                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1221                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1222                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1223             </actions>
1224         </permacrud>
1225         </class>
1226
1227     <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">
1228         <fields oils_persist:primary="name">
1229             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1230             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1231             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1232             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1233             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1234             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1235             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1236             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1237             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link" config_field="true"/>
1238             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1239         </fields>
1240         <links>
1241             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1242             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1243         </links>
1244         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1245             <actions>
1246                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1247                 <retrieve/>
1248                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1249                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1250             </actions>
1251         </permacrud>
1252     </class>
1253
1254     <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">
1255         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1256             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1257             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link" config_field="true"/>
1258             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1259             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1260             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1261             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1262             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1263         </fields>
1264         <links>
1265             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1266         </links>
1267         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1268             <actions>
1269                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1270                 <retrieve/>
1271                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1272                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1273             </actions>
1274         </permacrud>
1275     </class>
1276
1277     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1278                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1279                         oils_persist:tablename="config.z3950_index_field_map" 
1280                         reporter:label="Z39.50 Index Field Map">
1281         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1282             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1283             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1284             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1285             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1286             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1287             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1288         </fields>
1289         <links>
1290             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1291             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1292             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1293         </links>
1294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1295             <actions>
1296                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1297                 <retrieve/>
1298                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1299                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1300             </actions>
1301         </permacrud>
1302     </class>
1303
1304
1305         <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">
1306                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1307                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1308                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1309                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1310                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1311                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1312                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1313                 </fields>
1314                 <links>
1315             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1316             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1317                 </links>
1318                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1319                         <actions>
1320                                 <retrieve/>
1321                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1322                         </actions>
1323                 </permacrud>
1324         </class>
1325
1326         <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">
1327                 <fields oils_persist:primary="key">
1328                         <field reporter:label="Hook Key" name="key" reporter:datatype="text" reporter:selector="key"/>
1329                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1330                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1331                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1332                 </fields>
1333                 <links/>
1334                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1335                         <actions>
1336                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1337                                 <retrieve/>
1338                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1339                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1340                         </actions>
1341                 </permacrud>
1342         </class>
1343
1344         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1345                 <fields oils_persist:primary="module">
1346                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1347                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1348                 </fields>
1349                 <links/>
1350         </class>
1351
1352         <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">
1353                 <fields oils_persist:primary="module">
1354                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1355                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1356                 </fields>
1357                 <links/>
1358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1359                         <actions>
1360                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1361                                 <retrieve/>
1362                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1363                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1364                         </actions>
1365                 </permacrud>
1366         </class>
1367
1368         <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">
1369                 <fields oils_persist:primary="module">
1370                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1371                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1372                 </fields>
1373                 <links/>
1374                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1375                         <actions>
1376                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1377                                 <retrieve/>
1378                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1379                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1380                         </actions>
1381                 </permacrud>
1382         </class>
1383
1384         <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">
1385                 <fields oils_persist:primary="module">
1386                         <field reporter:label="Module Name" name="module" reporter:datatype="text" reporter:selector="module"/>
1387                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1388                 </fields>
1389                 <links/>
1390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1391                         <actions>
1392                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1393                                 <retrieve/>
1394                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1395                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1396                         </actions>
1397                 </permacrud>
1398         </class>
1399
1400         <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">
1401                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1402                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1403                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1404                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1405                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1406                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1407                 </fields>
1408                 <links>
1409                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1410                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1411                 </links>
1412                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1413                         <actions>
1414                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1415                     <context link="event_def" field="owner"/>
1416                 </create>
1417                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1418                     <context link="event_def" field="owner"/>
1419                 </retrieve>
1420                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1421                     <context link="event_def" field="owner"/>
1422                 </update>
1423                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1424                     <context link="event_def" field="owner"/>
1425                 </delete>
1426                         </actions>
1427                 </permacrud>
1428         </class>
1429
1430         <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">
1431                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1432                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1433                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1434                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1435                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1436                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1437                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1438                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1439                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1440                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1441                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1442                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1443                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1444                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1445                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1446                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1447                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1448                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1449                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1450                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1451                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1452                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1453                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1454                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1455                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1456                         <field reporter:label="Retention Interval" name="retention_interval" reporter:datatype="interval"/>
1457                 </fields>
1458                 <links>
1459                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1460                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1461                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1462                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1463                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1464                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1465                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1466                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1467                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1468                 </links>
1469                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1470                         <actions>
1471                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1472                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1473                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1474                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1475                         </actions>
1476                 </permacrud>
1477         </class>
1478
1479         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1480                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1481                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1482                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1483                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1484                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1485                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1486                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1487                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1488                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1489                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1490                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1491                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1492                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1493                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1494                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1495                 </fields>
1496                 <links>
1497                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1498                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1499                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1500                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1501                 </links>
1502         </class>
1503
1504         <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">
1505                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1506                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1507                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1508                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1509                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1510                 </fields>
1511                 <links>
1512                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1513                 </links>
1514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1515                         <actions>
1516                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1517                     <context link="event_def" field="owner"/>
1518                 </create>
1519                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1520                     <context link="event_def" field="owner"/>
1521                 </retrieve>
1522                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1523                     <context link="event_def" field="owner"/>
1524                 </update>
1525                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1526                     <context link="event_def" field="owner"/>
1527                 </delete>
1528                         </actions>
1529                 </permacrud>
1530         </class>
1531
1532         <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">
1533                 <oils_persist:source_definition><![CDATA[
1534                 SELECT  atevdef.hook,
1535                         atevdef.name,
1536                         atevdef.reactor,
1537                         atev.id,
1538                         atev.event_def,
1539                         atev.add_time,
1540                         atev.run_time,
1541                         atev.start_time,
1542                         atev.update_time,
1543                         atev.complete_time,
1544                         atev.update_process,
1545                         atev.state,
1546                         atev.user_data,
1547                         atev.template_output,
1548                         atev.error_output,
1549                         atev.async_output,
1550                         targ_circ.id AS target_circ,
1551                         targ_ahr.id AS target_hold,
1552                         COALESCE(
1553                                 targ_circ.circ_lib,
1554                                 targ_ahr.pickup_lib
1555                         ) AS perm_lib
1556                 FROM action_trigger.event atev
1557                 JOIN action_trigger.event_definition atevdef ON
1558                         (atevdef.id = atev.event_def)
1559                 JOIN action_trigger.hook ath ON
1560                         (ath.key = atevdef.hook)
1561                 LEFT JOIN action.circulation targ_circ ON
1562                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1563                 LEFT JOIN action.hold_request targ_ahr ON
1564                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1565                 WHERE atev.add_time > NOW() - (SELECT MIN(value) FROM (
1566                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1567                                 'circ.staff.max_visible_event_age',
1568                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1569                         ) UNION
1570                         SELECT '1000 YEARS'::INTERVAL AS value
1571                 ) ous)
1572                 ]]></oils_persist:source_definition>
1573                 <fields oils_persist:primary="id">
1574                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1575                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1576                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1577                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1578                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1579                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1580                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1581                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1582                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1583                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1584                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1585                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1586                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1587                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1588                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1589                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1590                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1591                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1592                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1593                 </fields>
1594                 <links>
1595                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1596                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1597                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1598                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1599                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1600                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1601                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1602                 </links>
1603                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1604                         <actions>
1605                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1606                         </actions>
1607                 </permacrud>
1608         </class>
1609
1610         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1611                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1612                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1613                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1614                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1615                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1616                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1617                 </fields>
1618                 <links>
1619                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1620                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1621                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1622                 </links>
1623                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1624                         <actions>
1625                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1626                         </actions>
1627                 </permacrud>
1628         </class>
1629
1630         <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">
1631                 <fields oils_persist:primary="code">
1632                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1633                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1634                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1635                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1636                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1637                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1638                 </fields>
1639                 <links/>
1640         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1641             <actions>
1642                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1643                 <retrieve/>
1644                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1645                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1646             </actions>
1647         </permacrud>
1648         </class>
1649
1650         <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">
1651                 <fields oils_persist:primary="code">
1652                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1653                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1654                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1655                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1656                 </fields>
1657                 <links/>
1658         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1659             <actions>
1660                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1661                 <retrieve/>
1662                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1663                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1664             </actions>
1665         </permacrud>
1666         </class>
1667
1668         <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">
1669                 <fields oils_persist:primary="code">
1670                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1671                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1672                 </fields>
1673                 <links/>
1674         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1675             <actions>
1676                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1677                 <retrieve/>
1678                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1679                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1680             </actions>
1681         </permacrud>
1682         </class>
1683
1684         <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">
1685                 <fields oils_persist:primary="code">
1686                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1687                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1688                 </fields>
1689                 <links/>
1690         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1691             <actions>
1692                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1693                 <retrieve/>
1694                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1695                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1696             </actions>
1697         </permacrud>
1698         </class>
1699
1700         <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">
1701                 <fields oils_persist:primary="code">
1702                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1703                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1704                 </fields>
1705                 <links/>
1706         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1707             <actions>
1708                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1709                 <retrieve/>
1710                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1711                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1712             </actions>
1713         </permacrud>
1714         </class>
1715
1716         <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">
1717                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1718                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1719                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1720                 </fields>
1721                 <links/>
1722         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1723             <actions>
1724                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1725                 <retrieve/>
1726                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1727                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1728             </actions>
1729         </permacrud>
1730         </class>
1731
1732         <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">
1733                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1734                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1735                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1736                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1737                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1738                 </fields>
1739         <links>
1740             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1741             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1742             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1743         </links>
1744         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1745             <actions>
1746                 <create permission="UPDATE_COPY">
1747                     <context link="target_copy" field="circ_lib"/>
1748                 </create>
1749                 <retrieve/>
1750                 <update permission="UPDATE_COPY">
1751                     <context link="target_copy" field="circ_lib"/>
1752                 </update>
1753                 <delete permission="UPDATE_COPY">
1754                     <context link="target_copy" field="circ_lib"/>
1755                 </delete>
1756             </actions>
1757         </permacrud>
1758         </class>
1759
1760         <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">
1761                 <fields oils_persist:primary="code">
1762                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1763                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1764                 </fields>
1765                 <links/>
1766         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1767             <actions>
1768                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1769                 <retrieve/>
1770                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1771                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1772             </actions>
1773         </permacrud>
1774         </class>
1775
1776         <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">
1777                 <fields oils_persist:primary="code">
1778                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1779                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1780                 </fields>
1781                 <links/>
1782         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1783             <actions>
1784                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1785                 <retrieve/>
1786                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1787                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1788             </actions>
1789         </permacrud>
1790         </class>
1791
1792         <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">
1793                 <fields oils_persist:primary="code">
1794                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1795                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1796                 </fields>
1797                 <links/>
1798         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1799             <actions>
1800                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1801                 <retrieve/>
1802                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1803                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1804             </actions>
1805         </permacrud>
1806         </class>
1807
1808     <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">
1809         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1810             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1811             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1812             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1813             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1814             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1815             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1816             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1817             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1818             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1819             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1820             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1821             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1822             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1823             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1824             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1825             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1826             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1827         </fields>
1828         <links/>
1829         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1830             <actions>
1831                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1832                 <retrieve/>
1833                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1834                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1835             </actions>
1836         </permacrud>
1837     </class>
1838
1839     <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">
1840         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1841             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1842             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1843             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1844             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1845             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1846             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1847             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1848             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1849             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1850             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1851             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1852             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1853             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1854             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1855             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1856             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1857             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1858             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1859             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1860         </fields>
1861         <links/>
1862         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1863             <actions>
1864                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1865                 <retrieve/>
1866                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1867                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1868             </actions>
1869         </permacrud>
1870     </class>
1871
1872     <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">
1873         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1874             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1875             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1876             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1877             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1878             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1879         </fields>
1880         <links>
1881             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1882             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1883             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1884         </links>
1885         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1886             <actions>
1887                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1888                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1889                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1890                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1891             </actions>
1892         </permacrud>
1893     </class>
1894
1895         <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">
1896                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1897                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1898                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1899                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1900                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1901                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1902                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1903                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1904                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1905                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1906                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1907                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1908                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1909                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1910                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1911                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1912                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1913             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1914                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1915                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1916                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1917                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1918                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1919                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1920                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1921                 </fields>
1922                 <links>
1923                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1924                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1925                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1926                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1927                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1928                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1929                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1930                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1931                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1932                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1933                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1934                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1935                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1936             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1937                 </links>
1938         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1939             <actions>
1940                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1941                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1942                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1943                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1944             </actions>
1945         </permacrud>
1946         </class>
1947
1948         <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">
1949                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1950                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1951                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1952                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1953                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1954                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1955                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1956                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1957                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1958                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1959                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1960                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1961                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1962                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1963                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1964                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1965             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1966                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1967                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1968             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1969                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1970                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1971                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1972                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1973             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1974             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1975             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1976                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1977                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1978                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1979                         <field name="description" reporter:datatype="text" reporter:label="Description"/>
1980                 </fields>
1981                 <links>
1982                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1983                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1984                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1985                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1986                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1987                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1988                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1989                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1990                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1991                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1992                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1993                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1994                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1995                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1996             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1997                 </links>
1998         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1999             <actions>
2000                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2001                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2002                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2003                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
2004             </actions>
2005         </permacrud>
2006         </class>
2007
2008     <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">
2009         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
2010             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2011             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2012             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2013         </fields>
2014         <links/>
2015         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2016             <actions>
2017                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2018                 <retrieve/>
2019                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2020                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
2021             </actions>
2022         </permacrud>
2023     </class>
2024
2025     <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">
2026         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
2027             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2028             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2029             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2030             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
2031             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
2032             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
2033             <field reporter:label="Description" name="description" reporter:datatype="text"/>
2034         </fields>
2035         <links>
2036             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2037         </links>
2038         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2039             <actions>
2040                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2041                 <retrieve/>
2042                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2043                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
2044             </actions>
2045         </permacrud>
2046     </class>
2047
2048     <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">
2049         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
2050             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2051             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
2052             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2053             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
2054             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2055         </fields>
2056         <links>
2057             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
2058             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2059         </links>
2060         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2061             <actions>
2062                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2063                     <context link="matchpoint" field="org_unit"/>
2064                 </create>
2065                 <retrieve/>
2066                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2067                     <context link="matchpoint" field="org_unit"/>
2068                 </update>
2069                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2070                     <context link="matchpoint" field="org_unit"/>
2071                 </delete>
2072             </actions>
2073         </permacrud>
2074     </class>
2075
2076     <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">
2077         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
2078             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2079             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2080             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
2081         </fields>
2082         <links>
2083             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2084             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
2085         </links>
2086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2087             <actions>
2088                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2089                     <context link="limit_set" field="owning_lib"/>
2090                 </create>
2091                 <retrieve/>
2092                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2093                     <context link="limit_set" field="owning_lib"/>
2094                 </update>
2095                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2096                     <context link="limit_set" field="owning_lib"/>
2097                 </delete>
2098             </actions>
2099         </permacrud>
2100     </class>
2101     <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">
2102         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
2103             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2104             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2105             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
2106         </fields>
2107         <links>
2108             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2109             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
2110         </links>
2111         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2112             <actions>
2113                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2114                     <context link="limit_set" field="owning_lib"/>
2115                 </create>
2116                 <retrieve/>
2117                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2118                     <context link="limit_set" field="owning_lib"/>
2119                 </update>
2120                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2121                     <context link="limit_set" field="owning_lib"/>
2122                 </delete>
2123             </actions>
2124         </permacrud>
2125     </class>
2126
2127     <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">
2128         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
2129             <field reporter:label="ID" name="id" reporter:datatype="id"/>
2130             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
2131             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
2132             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
2133         </fields>
2134         <links>
2135             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
2136             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
2137         </links>
2138         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2139             <actions>
2140                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2141                     <context link="limit_set" field="owning_lib"/>
2142                 </create>
2143                 <retrieve/>
2144                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2145                     <context link="limit_set" field="owning_lib"/>
2146                 </update>
2147                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2148                     <context link="limit_set" field="owning_lib"/>
2149                 </delete>
2150             </actions>
2151         </permacrud>
2152     </class>
2153
2154         <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">
2155                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2156                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2157                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2158                 </fields>
2159                 <links/>
2160         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2161             <actions>
2162                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2163                 <retrieve/>
2164                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2165                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2166             </actions>
2167         </permacrud>
2168         </class>
2169
2170         <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">
2171                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2172                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2173                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2174                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2175                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2176                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2177                 </fields>
2178                 <links>
2179                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2180                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2181                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2182                 </links>
2183         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2184             <actions>
2185                 <create permission="ADMIN_SURVEY">
2186                     <context link="survey" field="owner"/>
2187                 </create>
2188                 <retrieve/>
2189                 <update permission="ADMIN_SURVEY">
2190                     <context link="survey" field="owner"/>
2191                 </update>
2192                 <delete permission="ADMIN_SURVEY">
2193                     <context link="survey" field="owner"/>
2194                 </delete>
2195             </actions>
2196         </permacrud>
2197         </class>
2198         <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">
2199                 <fields oils_persist:primary="id" oils_persist:sequence="">
2200                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2201                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2202                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2203                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2204                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2205                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2206                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2207                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2208                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2209                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2210                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2211                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2212                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2213                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2214                 </fields>
2215                 <links>
2216                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2217                 </links>
2218                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2219                         <actions>
2220                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2221                                         <context link="usr" field="home_ou" />
2222                                 </retrieve>
2223                         </actions>
2224                 </permacrud>
2225         </class>
2226         <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">
2227                 <fields oils_persist:primary="id" oils_persist:sequence="">
2228                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2229                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2230                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2231                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2232                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2233                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2234                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2235                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2236                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2237                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2238                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2239                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2240                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2241                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2242                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2243                 </fields>
2244                 <links>
2245                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2246                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2247                 </links>
2248         </class>
2249         <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">
2250                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2251                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2252                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2253                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2254                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2255                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2256                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2257                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2258                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2259                 </fields>
2260                 <links>
2261                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2262                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2263                 </links>
2264                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2265                         <actions> <!-- created magically, so no create action -->
2266                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2267                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2268                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2269                         </actions>
2270                 </permacrud>
2271         </class>
2272         <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)">
2273                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2274                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2275                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2276                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2277                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2278                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2279                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2280                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2281                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2282                 </fields>
2283                 <links>
2284                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2285                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2286                 </links>
2287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2288                         <actions> <!-- created magically, so no create action -->
2289                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2290                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2291                         </actions>
2292                 </permacrud>
2293         </class>
2294         <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">
2295                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2296                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2297                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2298                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2299                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2300                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2301                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2302                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2303                 </fields>
2304                 <links>
2305                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2306                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2307                 </links>
2308         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2309             <actions>
2310                 <create permission="UPDATE_USER" context_field="owner">
2311                     <context link="usr" field="home_ou"/>
2312                 </create>
2313                                 <!-- note: public notes are still accessible via API -->
2314                 <retrieve permission="UPDATE_USER">
2315                     <context link="usr" field="home_ou"/>
2316                                 </retrieve>
2317                 <update permission="UPDATE_USER">
2318                     <context link="usr" field="home_ou"/>
2319                                 </update>
2320                 <delete permission="UPDATE_USER">
2321                     <context link="usr" field="home_ou"/>
2322                                 </delete>
2323             </actions>
2324         </permacrud>
2325         </class>
2326         <class id="aupw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_privacy_waiver" oils_persist:tablename="actor.usr_privacy_waiver" reporter:label="Privacy Waiver">
2327                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_privacy_waiver_id_seq">
2328                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2329                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2330                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2331                         <field reporter:label="Place Holds?" name="place_holds" reporter:datatype="bool" />
2332                         <field reporter:label="Pick Up Holds?" name="pickup_holds" reporter:datatype="bool" />
2333                         <field reporter:label="View Borrowing History?" name="view_history" reporter:datatype="bool" />
2334                         <field reporter:label="Check Out Items?" name="checkout_items" reporter:datatype="bool" />
2335                 </fields>
2336                 <links>
2337                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2338                 </links>
2339                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2340                         <actions>
2341                                 <create permission="UPDATE_USER">
2342                                         <context link="usr" field="home_ou"/>
2343                                 </create>
2344                                 <retrieve permission="VIEW_USER">
2345                                         <context link="usr" field="home_ou"/>
2346                                 </retrieve>
2347                                 <update permission="UPDATE_USER">
2348                                         <context link="usr" field="home_ou"/>
2349                                 </update>
2350                                 <delete permission="UPDATE_USER">
2351                                         <context link="usr" field="home_ou"/>
2352                                 </delete>
2353                         </actions>
2354                 </permacrud>
2355         </class>
2356         <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">
2357                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2358                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2359                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2360                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2361                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2362                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2363                 </fields>
2364                 <links>
2365                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2366                 </links>
2367         </class>
2368         <class id="aus" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2369                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2370                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2371                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2372                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2373                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2374                 </fields>
2375                 <links>
2376                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2377                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2378                 </links>
2379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2380                         <actions>
2381                                 <retrieve permission="VIEW_USER">
2382                                         <context link="usr" field="home_ou" />
2383                                 </retrieve>
2384                         </actions>
2385                 </permacrud>
2386         </class>
2387         <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">
2388                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2389                         <field name="field" reporter:datatype="link"/>
2390                         <field name="id" reporter:datatype="id" />
2391                         <field name="source" reporter:datatype="link"/>
2392                         <field name="value" reporter:datatype="text"/>
2393                 </fields>
2394                 <links>
2395                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2396                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2397                 </links>
2398         </class>
2399         <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">
2400                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2401                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2402                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2403                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2404                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2405                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2406                 </fields>
2407                 <links>
2408                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2409                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2410                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2411                 </links>
2412                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2413                         <actions>
2414                                 <retrieve/>
2415                         </actions>
2416                 </permacrud>
2417         </class>
2418         <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">
2419                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2420                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2421                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2422                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2423                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2424                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2425                 </fields>
2426                 <links>
2427                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2428                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2429                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2430                 </links>
2431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2432                         <actions>
2433                                 <retrieve/>
2434                         </actions>
2435                 </permacrud>
2436         </class>
2437         <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">
2438                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2439                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2440                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2441                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2442                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2443                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2444                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2445                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2446                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2447                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2448                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2449                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
2450                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2451                 </fields>
2452                 <links>
2453                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2454                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2455                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2456                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2457                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2458                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2459                 </links>
2460         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2461             <actions>
2462                 <create permission="TRANSIT_COPY" context_field="owner">
2463                     <context link="target_copy" field="circ_lib"/>
2464                 </create>
2465                 <retrieve/>
2466                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2467                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2468             </actions>
2469         </permacrud>
2470         </class>
2471         <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">
2472                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2473                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2474                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2475                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2476                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2477                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2478                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2479                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2480                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2481                 </fields>
2482                 <links>
2483                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2484                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2485                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2486                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2487                 </links>
2488         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2489             <actions>
2490                 <create permission="ADMIN_SURVEY">
2491                     <context link="survey" field="owner"/>
2492                 </create>
2493                 <retrieve permission="VIEW_USER">
2494                     <context link="usr" field="home_ou"/>
2495                 </retrieve>
2496                 <update permission="ADMIN_SURVEY">
2497                     <context link="survey" field="owner"/>
2498                 </update>
2499                 <delete permission="ADMIN_SURVEY">
2500                     <context link="survey" field="owner"/>
2501                 </delete>
2502             </actions>
2503         </permacrud>
2504         </class>
2505         <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">
2506                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2507                         <field name="bucket" />
2508                         <field name="id" reporter:datatype="id" />
2509                         <field name="target_copy" reporter:datatype="link"/>
2510                         <field name="create_time" reporter:datatype="timestamp" />
2511                         <field name="pos" reporter:datatype="int" />
2512                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2513                 </fields>
2514                 <links>
2515                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2516                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2517             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2518                 </links>
2519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2520                         <actions>
2521                                 <retrieve permission="ADMIN_COPY_BUCKET">
2522                     <context link="bucket" owning_lib="owning_lib"/>
2523                 </retrieve>
2524             </actions>
2525         </permacrud>
2526         </class>
2527         <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">
2528                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2529                         <field name="id" reporter:datatype="id" />
2530                         <field name="item" reporter:datatype="link"/>
2531                         <field name="note" reporter:datatype="text" />
2532                 </fields>
2533                 <links>
2534                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2535                 </links>
2536         </class>
2537
2538         <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">
2539                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2540                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2541                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2542                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2543                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true" config_field="true"/>
2544                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true" config_field="true"/>
2545                 </fields>
2546                 <links>
2547                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2548                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2549                 </links>
2550                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2551                         <actions>
2552                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2553                                 <retrieve/>
2554                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2555                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2556                         </actions>
2557                 </permacrud>
2558         </class>
2559
2560         <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">
2561                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2562                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2563                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2564                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link" config_field="true"/>
2565                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2566                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2567                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2568                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2569                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2570                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2571                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2572                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2573                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2574                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2575                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2576                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2577                         <field reporter:label="Heading Field" name="heading_field" reporter:datatype="link" />
2578                 </fields>
2579                 <links>
2580                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2581                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2582                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2583                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2584                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2585                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2586                         <link field="heading" reltype="has_a" key="id" map="" class="ahf"/>
2587                 </links>
2588                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2589                         <actions>
2590                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2591                                 <retrieve/>
2592                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2593                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2594                         </actions>
2595                 </permacrud>
2596         </class>
2597
2598         <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">
2599                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2600                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2601                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2602                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2603                 </fields>
2604                 <links>
2605                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2606                 </links>
2607                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2608                         <actions>
2609                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2610                                 <retrieve/>
2611                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2612                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2613                         </actions>
2614                 </permacrud>
2615         </class>
2616
2617         <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">
2618                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2619                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2620                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2621                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2622                 </fields>
2623                 <links>
2624                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2625                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2626                 </links>
2627                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2628                         <actions>
2629                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2630                                 <retrieve/>
2631                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2632                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2633                         </actions>
2634                 </permacrud>
2635         </class>
2636
2637         <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">
2638                 <fields oils_persist:primary="code">
2639                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2640                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link" config_field="true"/>
2641                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2642                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2643                         <field reporter:label="Short Code" name="short_code" reporter:datatype="text" />
2644                         <field reporter:label="URI" name="uri" reporter:datatype="text" />
2645                 </fields>
2646                 <links>
2647                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2648                 </links>
2649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2650                         <actions>
2651                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2652                                 <retrieve/>
2653                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2654                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2655                         </actions>
2656                 </permacrud>
2657         </class>
2658
2659         <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">
2660                 <fields oils_persist:primary="code">
2661                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2662                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2663                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2664                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2665                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2666                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2667                 </fields>
2668                 <links>
2669                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2670                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2671                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2672                 </links>
2673                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2674                         <actions>
2675                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2676                                 <retrieve/>
2677                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2678                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2679                         </actions>
2680                 </permacrud>
2681         </class>
2682
2683     <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">
2684         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2685             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2686             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2687             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2688         </fields>
2689         <links>
2690             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2691             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2692         </links>
2693         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2694             <actions>
2695                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2696                 <retrieve/>
2697                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2698                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2699             </actions>
2700         </permacrud>
2701     </class>
2702
2703         <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">
2704                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2705                         <field name="active" reporter:datatype="bool"/>
2706                         <field name="create_date" reporter:datatype="timestamp"/>
2707                         <field name="creator" />
2708                         <field name="deleted" reporter:datatype="bool"/>
2709                         <field name="edit_date" reporter:datatype="timestamp"/>
2710                         <field name="editor" />
2711                         <field name="id" reporter:datatype="id" />
2712                         <field name="last_xact_id" />
2713                         <field name="marc" />
2714                         <field name="source" />
2715                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2716                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2717                         <field name="heading" />
2718                         <field name="simple_heading" />
2719                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2720                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2721                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2722                 </fields>
2723                 <links>
2724                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2725                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2726                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2727                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2728                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2729                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2730                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2731                 </links>
2732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2733                         <actions>
2734                                 <create permission="CREATE_AUTHORITY_RECORD IMPORT_MARC" global_required="true"/>
2735                                 <retrieve/>
2736                                 <update permission="UPDATE_AUTHORITY_RECORD" global_required="true"/>
2737                                 <delete permission="DELETE_AUTHORITY_RECORD" global_required="true"/>
2738                         </actions>
2739                 </permacrud>
2740         </class>
2741         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2742                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2743                         <field name="char_encoding" />
2744                         <field name="id" />
2745                         <field name="record" />
2746                         <field name="record_status" />
2747                         <field name="thesaurus" />
2748                 </fields>
2749                 <links>
2750                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2751                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2752                 </links>
2753         </class>
2754         <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">
2755                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2756                         <field name="id" reporter:datatype="id" />
2757                         <field name="bib" reporter:datatype="link" />
2758                         <field name="authority" reporter:datatype="link" />
2759                 </fields>
2760                 <links>
2761                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2762                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2763                 </links>
2764         </class>
2765         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2766                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2767                         <field name="id" reporter:datatype="id" />
2768                         <field name="record" reporter:datatype="link" />
2769                         <field name="atag" reporter:datatype="link" />
2770                         <field name="value" reporter:datatype="text" />
2771                 </fields>
2772                 <links>
2773                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2774                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2775                 </links>
2776         </class>
2777
2778         <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">
2779                 <fields oils_persist:primary="id" oils_persist:sequence="authority.heading_fields_id_seq">
2780                         <field name="id" reporter:datatype="id" />
2781                         <field name="heading_type" reporter:datatype="text" reporter:label="Heading Type" />
2782                         <field name="heading_purpose" reporter:datatype="text" reporter:label="Heading Purpose" />
2783                         <field name="label" reporter:datatype="text" reporter:label="Heading Field Label" />
2784                         <field name="format" reporter:datatype="text" reporter:label="Heading XSLT Format" />
2785                         <field name="heading_xpath" reporter:datatype="text" reporter:label="Heading XPath" />
2786                         <field name="component_xpath" reporter:datatype="text" reporter:label="Heading Component XPath" />
2787                         <field name="type_xpath" reporter:datatype="text" reporter:label="Related/Variant Type XPath" />
2788                         <field name="thesaurus_xpath" reporter:datatype="text" reporter:label="Thesaurus XPath" />
2789                         <field name="thesaurus_override_xpath" reporter:datatype="text" reporter:label="Thesaurus Override XPath" />
2790                         <field name="joiner" reporter:datatype="text" reporter:label="Joiner string" />
2791                 </fields>
2792                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2793                         <actions>
2794                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2795                                 <retrieve/>
2796                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2797                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2798                         </actions>
2799                 </permacrud>
2800         </class>
2801
2802         <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">
2803                 <fields oils_persist:primary="code" oils_persist:sequence="">
2804                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2805                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2806                 </fields>
2807                 <links/>
2808         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2809             <actions>
2810                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2811                 <retrieve/>
2812                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2813                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2814             </actions>
2815         </permacrud>
2816         </class>
2817         <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">
2818                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2819                         <field name="accepting_usr" />
2820                         <field name="amount" reporter:datatype="money" />
2821                         <field name="amount_collected" reporter:datatype="money" />
2822                         <field name="approval_code" reporter:datatype="text"/>
2823                         <field name="cash_drawer" reporter:datatype="link"/>
2824                         <field name="cc_number" reporter:datatype="text"/>
2825                         <field name="cc_order_number" reporter:datatype="text"/>
2826                         <field name="cc_processor" reporter:datatype="text"/>
2827                         <field name="id" reporter:datatype="id" />
2828                         <field name="note" reporter:datatype="text"/>
2829                         <field name="payment_ts" reporter:datatype="timestamp"/>
2830                         <field name="xact" reporter:datatype="link"/>
2831                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2832                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2833                 </fields>
2834                 <links>
2835                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2836                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2837                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2838                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2839                 </links>
2840         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2841             <actions>
2842                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2843                     <context link="xact" jump="usr" field="home_ou"/>
2844                 </retrieve>
2845                         </actions>
2846                 </permacrud>
2847         </class>
2848         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition" oils_persist:field_safe="true">
2849                 <fields oils_persist:primary="name">
2850                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2851                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2852                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2853                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2854                 </fields>
2855                 <links/>
2856         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2857             <actions>
2858                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2859                 <retrieve/>
2860                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2861                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2862             </actions>
2863         </permacrud>
2864         </class>
2865
2866         <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">
2867                 <fields oils_persist:primary="alias">
2868                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2869                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2870                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2871                 </fields>
2872                 <links>
2873                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2874                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2875                 </links>
2876         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2877             <actions>
2878                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2879                 <retrieve/>
2880                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2881                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2882             </actions>
2883         </permacrud>
2884         </class>
2885
2886         <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">
2887                 <fields oils_persist:primary="name">
2888                         <field reporter:label="Name" name="name" reporter:datatype="text" reporter:selector="label"/>
2889                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2890                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2891                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2892                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2893                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2894                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2895                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2896                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2897                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2898                 </fields>
2899                 <links>
2900                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2901                 </links>
2902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2903             <actions>
2904                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2905                 <retrieve/>
2906                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2907                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2908             </actions>
2909         </permacrud>
2910         </class>
2911
2912         <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">
2913                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2914                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2915                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2916                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2917                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2918                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2919                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2920                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
2921                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2922                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2923                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2924                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2925                         <field reporter:label="Display Field?" name="display_field" reporter:datatype="bool" />
2926                         <field reporter:label="Display XPath" name="display_xpath" reporter:datatype="text" />
2927                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2928                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2929                         <field reporter:label="Browse Sort XPath" name="browse_sort_xpath" reporter:datatype="text" />
2930                         <field reporter:label="Authority XPath" name="authority_xpath" reporter:datatype="text" />
2931                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2932                         <field reporter:label="Display Field Map" name="display_field_map" oils_persist:virtual="true" reporter:datatype="link"/>
2933                         <field reporter:label="Virtual Field Data Suppliers" name="data_sources" oils_persist:virtual="true" reporter:datatype="link" config_field="true"/>
2934                 </fields>
2935                 <links>
2936                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
2937                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2938                         <link field="display_field_map" reltype="might_have" key="field" map="" class="cdfm"/>
2939                         <link field="data_sources" reltype="has_many" key="virtual" map="" class="cmfvm"/>
2940                 </links>
2941         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2942             <actions>
2943                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2944                 <retrieve/>
2945                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2946                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2947             </actions>
2948         </permacrud>
2949         </class>
2950
2951         <class id="cmfvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_virtual_map" oils_persist:tablename="config.metabib_field_virtual_map" reporter:label="Metabib Field Virtual Map" oils_persist:field_safe="true">
2952                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_virtual_map_id_seq">
2953                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2954                         <field reporter:label="Real" name="real" reporter:datatype="link"/>
2955                         <field reporter:label="Virtual" name="virtual" reporter:datatype="link" config_field="true"/>
2956                         <field reporter:label="Weight" name="weight" reporter:datatype="int"/>
2957                 </fields>
2958                 <links>
2959                         <link field="real" reltype="has_a" key="id" map="" class="cmf"/>
2960                         <link field="virtual" reltype="has_a" key="id" map="" class="cmf"/>
2961                 </links>
2962         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2963             <actions>
2964                 <create permission="CREATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2965                 <retrieve/>
2966                 <update permission="UPDATE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2967                 <delete permission="DELETE_METABIB_FIELD ADMIN_METABIB_FIELD" global_required="true"/>
2968             </actions>
2969         </permacrud>
2970         </class>
2971
2972         <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">
2973                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2974                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2975                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2976                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2977                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2978                         <field reporter:label="Owning Lib to Patron Home Lib Proximity" name="owning_lib_to_home_lib_prox" reporter:datatype="int" />
2979                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2980                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2981                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2982                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2983                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2984                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2985                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2986                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2987                 </fields>
2988                 <links>
2989                 </links>
2990                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2991                         <actions>
2992                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2993                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2994                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2995                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2996                         </actions>
2997                 </permacrud>
2998         </class>
2999         <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">
3000                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
3001                         <field name="id" reporter:datatype="id" />
3002                         <field name="name" reporter:datatype="text"/>
3003                         <field name="xpath" reporter:datatype="text"/>
3004                         <field name="format" reporter:datatype="link"/>
3005                         <field name="first_word" reporter:datatype="bool" />
3006                 </fields>
3007                 <links/>
3008         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3009             <actions>
3010                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
3011                 <retrieve/>
3012                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
3013                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
3014             </actions>
3015         </permacrud>
3016         </class>
3017         <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">
3018                 <fields oils_persist:primary="code" oils_persist:sequence="">
3019                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3020                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
3021                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3022                 </fields>
3023                 <links/>
3024         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3025             <actions>
3026                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3027                 <retrieve/>
3028                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3029                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3030             </actions>
3031         </permacrud>
3032         </class>
3033         <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">
3034                 <fields oils_persist:primary="code" oils_persist:sequence="">
3035                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
3036                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
3037                 </fields>
3038                 <links/>
3039         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3040             <actions>
3041                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
3042                 <retrieve/>
3043                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
3044                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
3045             </actions>
3046         </permacrud>
3047         </class>
3048     <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">
3049         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
3050             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
3051             <field reporter:label="Name" name="name" reporter:datatype="text"/>
3052             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
3053             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
3054         </fields>
3055         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3056             <actions>
3057                 <retrieve/>
3058             </actions>
3059         </permacrud>
3060     </class>
3061         <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">
3062                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
3063                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3064                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3065                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3066                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3067                 </fields>
3068                 <links>
3069                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3070                 </links>
3071         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3072             <actions>
3073                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3074                 <retrieve/>
3075                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
3076                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
3077             </actions>
3078         </permacrud>
3079         </class>
3080         <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">
3081                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
3082                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3083                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3084                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
3085                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3086                 </fields>
3087                 <links>
3088                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3089                 </links>
3090         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3091             <actions>
3092                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
3093                 <retrieve/>
3094                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
3095                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
3096             </actions>
3097         </permacrud>
3098         </class>
3099         <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">
3100                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
3101                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3102                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
3103                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3104                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3105                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3106                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3107                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
3108                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
3109                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3110                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3111                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3112                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3113                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
3114                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
3115                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
3116                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
3117                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
3118                 </fields>
3119                 <links>
3120                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3121                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3122                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3123                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3124                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
3125                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
3126                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
3127                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
3128                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
3129                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
3130                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
3131                 </links>
3132         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3133             <actions>
3134                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
3135                 <retrieve/>
3136                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
3137                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
3138             </actions>
3139         </permacrud>
3140         </class>
3141         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
3142                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
3143                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
3144                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
3145                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3146                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
3147                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3148                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3149                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3150                 </fields>
3151                 <links>
3152                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
3153                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
3154         </links>
3155         </class>
3156         <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">
3157                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
3158                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3159                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
3160                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
3161                 </fields>
3162                 <links>
3163                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
3164                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3165                 </links>
3166         </class>
3167         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
3168                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
3169                         <field name="id" reporter:datatype="id" />
3170                         <field name="value" oils_persist:i18n="true" />
3171                 </fields>
3172                 <links/>
3173         </class>
3174         <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">
3175                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3176                         <field name="balance_owed" reporter:datatype="money" />
3177                         <field name="total_owed" reporter:datatype="money" />
3178                         <field name="total_paid" reporter:datatype="money" />
3179                         <field name="usr" reporter:datatype="link"/>
3180                 </fields>
3181                 <links>
3182                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3183         </links>
3184         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3185             <actions>
3186                 <retrieve permission="VIEW_USER">
3187                     <context link="usr" field="home_ou"/>
3188                 </retrieve>
3189             </actions>
3190         </permacrud>
3191         </class>
3192         <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">
3193                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
3194                         <field name="collector" />
3195                         <field name="enter_time" reporter:datatype="timestamp"/>
3196                         <field name="id" reporter:datatype="id" />
3197                         <field name="location" reporter:datatype="link"/>
3198                         <field name="usr" reporter:datatype="link"/>
3199                 </fields>
3200                 <links>
3201                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3202                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
3203                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
3204                 </links>
3205         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3206             <actions>
3207                 <create permission="money.collections_tracker.create" context_field="location"/>
3208                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
3209                 <delete permission="money.collections_tracker.create" context_field="location"/>
3210             </actions>
3211         </permacrud>
3212         </class>
3213         <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">
3214                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
3215                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
3216                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
3217                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
3218                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3219                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
3220                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
3221                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
3222                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3223                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
3224                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3225                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
3226                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
3227                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
3228                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
3229                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
3230                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
3231                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
3232                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
3233                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
3234                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
3235                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3236                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3237                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3238                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3239                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3240                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3241                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3242                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3243                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
3244                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
3245                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
3246                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3247                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
3248                         <field reporter:label="Display Fields" name="display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3249                         <field reporter:label="Flat Display Entries" name="flat_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3250                         <field reporter:label="Compressed Display Entries" name="compressed_display_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3251                         <field reporter:label="Wide Display Entries" name="wide_display_entry" oils_persist:virtual="true" reporter:datatype="link"/>
3252                         <field reporter:label="Merge Date" name="merge_date" reporter:datatype="timestamp"/>
3253                         <field reporter:label="Merged To" name="merged_to" reporter:datatype="link"/>
3254                 </fields>
3255                 <links>
3256                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3257                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3258                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3259                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
3260                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
3261                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
3262                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
3263                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3264                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3265                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3266                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3267                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3268                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3269                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3270                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3271                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3272                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3273                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3274                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3275                         <link field="mattrs" reltype="has_many" key="id" map="" class="mraf"/>
3276                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3277                         <link field="display_entries" reltype="has_many" key="source" map="" class="mde"/>
3278                         <link field="flat_display_entries" reltype="has_many" key="source" map="" class="mfde"/>
3279                         <link field="compressed_display_entries" reltype="has_many" key="source" map="" class="mcde"/>
3280                         <link field="wide_display_entry" reltype="might_have" key="source" map="" class="mwde"/>
3281                         <link field="merged_to" reltype="has_a" key="id" map="" class="bre"/>
3282                 </links>
3283         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3284             <actions>
3285                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3286                 <retrieve/>
3287                 <update permission="UPDATE_MARC" global_required="true"/>
3288                 <!-- 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. -->
3289                 <delete permission="DELETE_RECORD" global_required="true"/>
3290             </actions>
3291         </permacrud>
3292         </class>
3293         <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">
3294                 <fields oils_persist:primary="id">
3295                         <field name="dow_0_close" />
3296                         <field name="dow_0_open" />
3297                         <field name="dow_1_close" />
3298                         <field name="dow_1_open" />
3299                         <field name="dow_2_close" />
3300                         <field name="dow_2_open" />
3301                         <field name="dow_3_close" />
3302                         <field name="dow_3_open" />
3303                         <field name="dow_4_close" />
3304                         <field name="dow_4_open" />
3305                         <field name="dow_5_close" />
3306                         <field name="dow_5_open" />
3307                         <field name="dow_6_close" />
3308                         <field name="dow_6_open" />
3309                         <field name="id" reporter:datatype="id" />
3310                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3311                 </fields>
3312                 <links>
3313                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3314                 </links>
3315         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3316             <actions>
3317                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3318                 <retrieve/>
3319                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3320                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3321             </actions>
3322         </permacrud>
3323         </class>
3324         <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">
3325                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3326                         <field name="id" reporter:datatype="id" />
3327                         <field name="record" reporter:datatype="link"/>
3328                         <field name="label" reporter:datatype="text"/>
3329                         <field name="label_sortkey" reporter:datatype="text"/>
3330                         <field name="deleted" reporter:datatype="bool"/>
3331                 </fields>
3332                 <links>
3333                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3334                 </links>
3335         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3336             <actions>
3337                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3338                 <retrieve/>
3339                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3340                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3341             </actions>
3342         </permacrud>
3343         </class>
3344         <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">
3345                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3346                         <field name="id" reporter:datatype="id" />
3347                         <field name="target_copy" reporter:datatype="link" />
3348                         <field name="part" reporter:datatype="link"/>
3349                 </fields>
3350                 <links>
3351                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3352                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3353                 </links>
3354         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3355             <actions>
3356                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3357                 <retrieve/>
3358                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3359                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3360             </actions>
3361         </permacrud>
3362         </class>
3363     <class  id="aecc"
3364             controller="open-ils.cstore open-ils.pcrud"
3365             oils_obj:fieldmapper="action::emergency_closing_circulation"
3366             oils_persist:tablename="action.emergency_closing_circulation"
3367             reporter:label="Emergency Closing Circulation Entry"
3368             oils_persist:readonly="true"
3369     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3370         <fields oils_persist:primary="id">
3371             <field name="id" reporter:datatype="id" />
3372             <field name="circulation" reporter:datatype="link" />
3373                         <field name="emergency_closing" reporter:datatype="link"/>
3374             <field name="original_due_date" reporter:datatype="timestamp" />
3375             <field name="process_time" reporter:datatype="timestamp" />
3376         </fields>
3377         <links>
3378             <link field="circulation" reltype="has_a" key="id" map="" class="circ"/>
3379             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3380         </links>
3381         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3382             <actions>
3383                 <retrieve/>
3384             </actions>
3385         </permacrud>
3386     </class>
3387     <class  id="aecr"
3388             controller="open-ils.cstore open-ils.pcrud"
3389             oils_obj:fieldmapper="action::emergency_closing_reservation"
3390             oils_persist:tablename="action.emergency_closing_reservation"
3391             reporter:label="Emergency Closing Reservation Entry"
3392             oils_persist:readonly="true"
3393     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3394         <fields oils_persist:primary="id">
3395             <field name="id" reporter:datatype="id" />
3396             <field name="reservation" reporter:datatype="link" />
3397                         <field name="emergency_closing" reporter:datatype="link"/>
3398             <field name="original_end_time" reporter:datatype="timestamp" />
3399             <field name="process_time" reporter:datatype="timestamp" />
3400         </fields>
3401         <links>
3402             <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3403             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3404         </links>
3405         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3406             <actions>
3407                 <retrieve/>
3408             </actions>
3409         </permacrud>
3410     </class>
3411     <class  id="aech"
3412             controller="open-ils.cstore open-ils.pcrud"
3413             oils_obj:fieldmapper="action::emergency_closing_hold"
3414             oils_persist:tablename="action.emergency_closing_hold"
3415             reporter:label="Emergency Closing Hold Entry"
3416             oils_persist:readonly="true"
3417     > <!-- This is not a view, but is managed via functions, so it's readonly. -->
3418         <fields oils_persist:primary="id">
3419             <field name="id" reporter:datatype="id" />
3420             <field name="hold" reporter:datatype="link" />
3421                         <field name="emergency_closing" reporter:datatype="link"/>
3422             <field name="original_shelf_expire_time" reporter:datatype="timestamp" />
3423             <field name="process_time" reporter:datatype="timestamp" />
3424         </fields>
3425         <links>
3426             <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3427             <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3428         </links>
3429         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3430             <actions>
3431                 <retrieve/>
3432             </actions>
3433         </permacrud>
3434     </class>
3435     <class  id="aecs"
3436             controller="open-ils.cstore open-ils.pcrud"
3437             oils_obj:fieldmapper="action::emergency_closing_status"
3438             oils_persist:tablename="action.emergency_closing_status"
3439             reporter:label="Emergency Closing Status"
3440             oils_persist:readonly="true"
3441     >
3442         <fields oils_persist:primary="id">
3443             <field name="id" reporter:datatype="id" />
3444             <field name="creator" reporter:datatype="link" />
3445             <field name="create_time" reporter:datatype="timestamp" />
3446             <field name="process_start_time" reporter:datatype="timestamp" />
3447             <field name="process_end_time" reporter:datatype="timestamp" />
3448             <field name="last_update_time" reporter:datatype="timestamp" />
3449             <field name="circulations" reporter:datatype="int" />
3450             <field name="circulations_complete" reporter:datatype="int" />
3451             <field name="reservations" reporter:datatype="int" />
3452             <field name="reservations_complete" reporter:datatype="int" />
3453             <field name="holds" reporter:datatype="int" />
3454             <field name="holds_complete" reporter:datatype="int" />
3455         </fields>
3456         <links>
3457             <link field="id" reltype="has_a" key="id" map="" class="aec"/>
3458         </links>
3459         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3460             <actions>
3461                 <retrieve/>
3462             </actions>
3463         </permacrud>
3464     </class>
3465     <class id="aec" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::emergency_closing" oils_persist:tablename="action.emergency_closing" reporter:label="Emergency Closing">
3466         <fields oils_persist:primary="id" oils_persist:sequence="action.emergency_closing_id_seq">
3467             <field name="id" reporter:datatype="id" />
3468             <field name="creator" reporter:datatype="link" />
3469             <field name="create_time" reporter:datatype="timestamp" />
3470             <field name="process_start_time" reporter:datatype="timestamp" />
3471             <field name="process_end_time" reporter:datatype="timestamp" />
3472             <field name="last_update_time" reporter:datatype="timestamp" />
3473             <field name="closing" oils_persist:virtual="true" reporter:datatype="link"/>
3474             <field name="status" oils_persist:virtual="true" reporter:datatype="link"/>
3475             <field name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3476             <field name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3477             <field name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3478         </fields>
3479         <links>
3480             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3481             <link field="closing" reltype="might_have" key="emergency_closing" map="" class="aoucd"/>
3482             <link field="status" reltype="might_have" key="id" map="" class="aecs"/>
3483             <link field="circulations" reltype="has_many" key="emergency_closing" map="" class="aecc"/>
3484             <link field="reservations" reltype="has_many" key="emergency_closing" map="" class="aecr"/>
3485             <link field="holds" reltype="has_many" key="emergency_closing" map="" class="aech"/>
3486         </links>
3487         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3488             <actions>
3489                 <create permission="EMERGENCY_CLOSING">
3490                     <context link="closing" field="org_unit" />
3491                 </create>
3492                 <retrieve/>
3493                 <update permission="EMERGENCY_CLOSING">
3494                     <context link="closing" field="org_unit" />
3495                 </update>
3496                 <delete permission="EMERGENCY_CLOSING">
3497                     <context link="closing" field="org_unit" />
3498                 </delete>
3499             </actions>
3500         </permacrud>
3501     </class>
3502         <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">
3503                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3504                         <field name="close_end" reporter:datatype="timestamp" />
3505                         <field name="close_start" reporter:datatype="timestamp" />
3506                         <field name="id" reporter:datatype="id" />
3507                         <field name="org_unit" reporter:datatype="org_unit"/>
3508                         <field name="reason" reporter:datatype="text"/>
3509                         <field name="full_day" reporter:datatype="bool"/>
3510                         <field name="multi_day" reporter:datatype="bool"/>
3511                         <field name="emergency_closing" reporter:datatype="link"/>
3512                 </fields>
3513                 <links>
3514                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3515                         <link field="emergency_closing" reltype="has_a" key="id" map="" class="aec"/>
3516                 </links>
3517         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3518             <actions>
3519                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3520                 <retrieve/>
3521                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3522                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3523             </actions>
3524         </permacrud>
3525         </class>
3526         <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">
3527                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3528                         <field name="extended" reporter:datatype="interval"/>
3529                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3530                         <field name="max_renewals" reporter:datatype="int" />
3531                         <field name="name" reporter:datatype="text"/>
3532                         <field name="normal" reporter:datatype="interval"/>
3533                         <field name="shrt" reporter:datatype="interval"/>
3534                         <field name="max_auto_renewals" reporter:datatype="int" />
3535                 </fields>
3536                 <links>
3537                 </links>
3538         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3539             <actions>
3540                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3541                 <retrieve/>
3542                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3543                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3544             </actions>
3545         </permacrud>
3546         </class>
3547
3548         <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">
3549                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3550                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3551                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3552             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3553                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3554             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3555                         <field reporter:label="Values" name="values" oils_persist:virtual="true" 
3556                                 reporter:datatype="link" config_field="true"/>
3557                 </fields>
3558                 <links>
3559             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3560                         <link field="values" reltype="has_many" key="hard_due_date" map="" class="chddv"/>
3561                 </links>
3562                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3563             <actions>
3564                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3565                 <retrieve/>
3566                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3567                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3568             </actions>
3569                 </permacrud>
3570         </class>
3571
3572         <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">
3573                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3574                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3575                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link" config_field="true"/>
3576                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3577             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3578                 </fields>
3579                 <links>
3580                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3581                 </links>
3582                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3583             <actions>
3584                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3585                 <retrieve/>
3586                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3587                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3588             </actions>
3589                 </permacrud>
3590         </class>
3591
3592         <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">
3593                 <fields oils_persist:primary="id" oils_persist:sequence="">
3594                         <field name="balance_owed" reporter:datatype="money"/>
3595                         <field name="id" reporter:datatype="id" />
3596                         <field name="last_billing_note" reporter:datatype="text"/>
3597                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3598                         <field name="last_billing_type" reporter:datatype="text"/>
3599                         <field name="last_payment_note" reporter:datatype="text"/>
3600                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3601                         <field name="last_payment_type" reporter:datatype="text"/>
3602                         <field name="total_owed" reporter:datatype="money"/>
3603                         <field name="total_paid" reporter:datatype="money"/>
3604                         <field name="usr" reporter:datatype="link"/>
3605                         <field name="xact_finish" reporter:datatype="timestamp" />
3606                         <field name="xact_start" reporter:datatype="timestamp" />
3607                         <field name="xact_type" reporter:datatype="text"/>
3608                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3609                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3610                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3611                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3612                         <field name="billing_location" reporter:datatype="link"/>
3613                 </fields>
3614                 <links>
3615                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3616                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3617                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3618                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3619                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3620                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3621                 </links>
3622                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3623                         <actions>
3624                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3625                                         <context link="usr" field="home_ou" />
3626                                 </retrieve>
3627                         </actions>
3628                 </permacrud>
3629         </class>
3630         <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">
3631                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3632                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3633                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3634                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3635                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3636                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3637                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3638                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3639                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3640                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3641                         <field reporter:label="Privacy Waiver Entries" name = "waiver_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3642                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3643                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3644                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3645                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3646                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3647                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3648                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3649                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3650                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3651                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3652                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3653                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3654                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3655                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3656                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3657                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3658                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3659                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3660                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3661                         <field reporter:label="User ID" name="id" reporter:datatype="id" reporter:selector="usrname" />
3662                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3663                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3664                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3665                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3666                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3667                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3668                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3669                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3670                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3671                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3672                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3673                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3674                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3675                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3676                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3677                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3678                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3679                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3680                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3681                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3682                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3683                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3684                         <field reporter:label="Preferred Prefix" name="pref_prefix" reporter:datatype="text"/>
3685                         <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
3686                         <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
3687                         <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
3688                         <field reporter:label="Preferred Suffix" name="pref_suffix" reporter:datatype="text"/>
3689                         <field reporter:label="Parent/Guardian" name="guardian" reporter:datatype="text"/>
3690                         <field reporter:label="Name Keywords" name="name_keywords" reporter:datatype="text"/>
3691                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3692                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3693                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3694                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3695                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3696                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3697                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3698                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3699                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3700                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3701                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3702                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3703                         <field reporter:label="User/Working Location Map" name="usr_work_ou_map" oils_persist:virtual="true" reporter:datatype="link"/>
3704                 </fields>
3705                 <links>
3706                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3707                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3708                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3709                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3710                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3711                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3712                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3713                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3714                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3715                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3716                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3717                         <link field="waiver_entries" reltype="has_many" key="usr" map="" class="aupw"/>
3718                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3719                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3720                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3721                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3722                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3723                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3724                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3725                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3726                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3727                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3728                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3729                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3730                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3731                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3732                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3733                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3734                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3735                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3736                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3737                         <link field="usr_work_ou_map" reltype="has_many" key="usr" map="" class="puwoum"/>
3738                 </links>
3739                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3740                         <actions>
3741                                 <retrieve permission="VIEW_USER user_request.view" context_field="home_ou" />
3742                         </actions>
3743                 </permacrud>
3744         </class>
3745         <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">
3746                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3747                         <field name="id" reporter:label="ID" reporter:datatype="id" reporter:selector="label"/>
3748                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3749                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3750                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3751                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3752                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3753                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3754                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3755         </fields>
3756                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3757                         <actions>
3758                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3759                                 <retrieve/>
3760                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3761                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3762                         </actions>
3763                 </permacrud>
3764         </class>
3765         <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">
3766                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3767                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3768                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3769                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3770                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3771         </fields>
3772         <links>
3773                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3774                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3775                 </links>
3776                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3777                         <actions>
3778                                 <retrieve permission="RUN_REPORTS">
3779                                         <context link="usr" field="home_ou" />
3780                                 </retrieve>
3781                         </actions>
3782                 </permacrud>
3783         </class>
3784         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3785                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3786                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3787                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3788                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3789                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3790                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3791                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3792         </fields>
3793         <links>
3794                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3795                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3796                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3797                 </links>
3798                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3799                         <actions>
3800                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3801                                         <context link="usr" field="home_ou" />
3802                                         <context link="ws" field="owning_lib" />
3803                                 </retrieve>
3804                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3805                                         <context link="usr" field="home_ou" />
3806                                         <context link="ws" field="owning_lib" />
3807                                 </create>
3808                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3809                                         <context link="usr" field="home_ou" />
3810                                         <context link="ws" field="owning_lib" />
3811                                 </update>
3812                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3813                                         <context link="usr" field="home_ou" />
3814                                         <context link="ws" field="owning_lib" />
3815                                 </delete>
3816                         </actions>
3817                 </permacrud>
3818         </class>
3819         <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">
3820                 <fields oils_persist:primary="name">
3821                         <field name="name" reporter:datatype="text"/>
3822                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3823                 </fields>
3824                 <links/>
3825                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3826                         <actions>
3827                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3828                                 <retrieve/>
3829                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3830                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3831                         </actions>
3832                 </permacrud>
3833         </class>
3834         <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">
3835                 <fields oils_persist:primary="name">
3836                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3837                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3838                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3839                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3840                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3841                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3842                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3843                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3844                 </fields>
3845                 <links>
3846                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3847                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3848                 </links>
3849                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3850                         <actions>
3851                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3852                                 <retrieve/>
3853                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3854                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3855                         </actions>
3856                 </permacrud>
3857         </class>
3858         <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">
3859                 <fields oils_persist:primary="name">
3860                         <field name="name" reporter:datatype="text"/>
3861                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3862                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3863                         <field name="datatype" reporter:datatype="text"/>
3864                         <field name="view_perm" reporter:datatype="link"/>
3865                         <field name="update_perm" reporter:datatype="link"/>
3866                         <field name="fm_class" reporter:datatype="text"/>
3867                         <field name="grp" reporter:datatype="link"/>
3868                 </fields>
3869                 <links>
3870                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3871                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3872                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3873                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3874                 </links>
3875                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3876                         <actions>
3877                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3878                                 <retrieve/>
3879                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3880                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3881                         </actions>
3882                 </permacrud>
3883         </class>
3884         <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">
3885                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3886                         <field name="id" />
3887                         <field name="name"  reporter:datatype="text"/>
3888                         <field name="org_unit" reporter:datatype="org_unit"/>
3889                         <field name="value"  reporter:datatype="text"/>
3890                 </fields>
3891                 <links>
3892                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3893                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3894                 </links>
3895         </class>
3896         <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">
3897                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3898                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3899                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3900                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3901                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3902                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3903                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3904                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3905                 </fields>
3906                 <links>
3907                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3908                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3909                 </links>
3910         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3911             <actions>
3912                 <create permission="CREATE_COPY_NOTE">
3913                     <context link="owning_copy" field="circ_lib"/>
3914                 </create>
3915                 <retrieve permission="VIEW_COPY_NOTES">
3916                     <context link="owning_copy" field="circ_lib"/>
3917                 </retrieve>
3918                 <update permission="UPDATE_COPY_NOTE">
3919                     <context link="owning_copy" field="circ_lib"/>
3920                 </update>
3921                 <delete permission="DELETE_COPY_NOTE">
3922                     <context link="owning_copy" field="circ_lib"/>
3923                 </delete>
3924             </actions>
3925         </permacrud>
3926         </class>
3927         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3928                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3929                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3930                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3931                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3932                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3933                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3934                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3935                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3936                 </fields>
3937                 <links>
3938                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3939                 </links>
3940         </class>
3941         <class id="mmr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3942                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3943                         <field name="fingerprint"  reporter:datatype="text"/>
3944                         <field name="id" reporter:datatype="id" reporter:selector="fingerprint" />
3945                         <field name="master_record" reporter:datatype="link"/>
3946                         <field name="mods"  reporter:datatype="text"/>
3947                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3948                         <field name="source_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3949                 </fields>
3950                 <links>
3951                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3952                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3953                         <link field="source_maps" reltype="has_many" key="metarecord" class="mmrsm"/>
3954                 </links>
3955                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3956                         <actions>
3957                                 <retrieve/>
3958                         </actions>
3959                 </permacrud>
3960         </class>
3961         <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">
3962                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3963                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3964                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3965                 </fields>
3966                 <links/>
3967         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3968             <actions>
3969                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3970                 <retrieve/>
3971                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3972                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3973             </actions>
3974         </permacrud>
3975         </class>
3976         <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">
3977                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3978                         <field name="code"  reporter:datatype="text"/>
3979                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3980                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3981                 </fields>
3982                 <links/>
3983         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3984             <actions>
3985                 <create permission="CREATE_PERM" global_required="true"/>
3986                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3987                 <update permission="UPDATE_PERM" global_required="true"/>
3988                 <delete permission="DELETE_PERM" global_required="true"/>
3989             </actions>
3990         </permacrud>
3991         </class>
3992         <class id="mmrsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">
3993                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3994                         <field name="id" reporter:datatype="id" />
3995                         <field name="metarecord" reporter:datatype="link"/>
3996                         <field name="source" reporter:datatype="link"/>
3997                 </fields>
3998                 <links>
3999                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4000                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
4001                 </links>
4002                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4003                         <actions>
4004                                 <retrieve/>
4005                         </actions>
4006                 </permacrud>
4007         </class>
4008         <class id="mde" controller="open-ils.cstore open-ils.pcrud" 
4009                         oils_obj:fieldmapper="metabib::display_entry" 
4010                         oils_persist:tablename="metabib.display_entry" 
4011                         oils_persist:field_safe="true"
4012                         reporter:label="Display Field Entry" oils_persist:readonly="true">
4013                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.display_entry_id_seq">
4014                         <field name="id" reporter:datatype="id" />
4015                         <field name="field" reporter:datatype="link"/>
4016                         <field name="source" reporter:datatype="link"/>
4017                         <field name="value"  reporter:datatype="text"/>
4018                         <field name="highlight" oils_persist:virtual="true"  reporter:datatype="text"/>
4019                 </fields>
4020                 <links>
4021                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4022                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4023                 </links>
4024                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4025                         <actions>
4026                                 <retrieve/>
4027                         </actions>
4028                 </permacrud>
4029         </class>
4030         <class id="mfde" controller="open-ils.cstore open-ils.pcrud" 
4031                 oils_persist:tablename="metabib.flat_display_entry"
4032                 oils_obj:fieldmapper="metabib::flat_display_entry" 
4033                 oils_persist:field_safe="true"
4034                 reporter:label="Flat Display Entry" 
4035                 oils_persist:readonly="true">
4036                 <fields>
4037                         <field name="source" reporter:datatype="id" />
4038                         <field name="name" reporter:datatype="text"/>
4039                         <field name="multi" reporter:datatype="bool"/>
4040                         <field name="label" reporter:datatype="text"/>
4041                         <field name="field" reporter:datatype="link"/>
4042                         <field name="value" reporter:datatype="text"/>
4043                 </fields>
4044                 <links>
4045                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4046                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4047                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4048                 </links>
4049                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4050                         <actions>
4051                                 <retrieve/>
4052                         </actions>
4053                 </permacrud>
4054         </class>
4055         <class id="mcde" controller="open-ils.cstore open-ils.pcrud" 
4056                 oils_persist:tablename="metabib.compressed_display_entry"
4057                 oils_obj:fieldmapper="metabib::compressed_display_entry" 
4058                 oils_persist:field_safe="true"
4059                 reporter:label="Compressed Display Entry" 
4060                 oils_persist:readonly="true">
4061                 <fields>
4062                         <field name="source" reporter:datatype="id" />
4063                         <field name="name" reporter:datatype="text"/>
4064                         <field name="multi" reporter:datatype="bool"/>
4065                         <field name="label" reporter:datatype="text"/>
4066                         <field name="field" reporter:datatype="link"/>
4067                         <field name="value" reporter:datatype="text"/>
4068                 </fields>
4069                 <links>
4070                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4071                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4072                         <link field="name" reltype="has_a" key="name" map="" class="cdfm"/>
4073                 </links>
4074                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4075                         <actions>
4076                                 <retrieve/>
4077                         </actions>
4078                 </permacrud>
4079         </class>
4080         <class id="mwde" controller="open-ils.cstore open-ils.pcrud" 
4081                 oils_persist:tablename="metabib.wide_display_entry"
4082                 oils_obj:fieldmapper="metabib::wide_display_entry" 
4083                 oils_persist:field_safe="true"
4084                 reporter:label="Wide Display Entry" 
4085                 oils_persist:readonly="true">
4086                 <fields oils_persist:primary="source">
4087                         <field name="source" reporter:label="Record ID" reporter:datatype="id" />
4088                         <field name="title" reporter:label="Title" reporter:datatype="text"/>
4089                         <field name="author" reporter:label="Author" reporter:datatype="text"/>
4090                         <field name="creators" reporter:label="Creators" reporter:datatype="text"/>
4091                         <field name="isbn" reporter:label="ISBN" reporter:datatype="text"/>
4092                         <field name="issn" reporter:label="ISSN" reporter:datatype="text"/>
4093                         <field name="upc" reporter:label="UPC" reporter:datatype="text"/>
4094                         <field name="tcn" reporter:label="TCN" reporter:datatype="text"/>
4095                         <field name="edition" reporter:label="Edition" reporter:datatype="text"/>
4096                         <field name="physical_description" reporter:label="Physical Description" reporter:datatype="text"/>
4097                         <field name="publisher" reporter:label="Publisher" reporter:datatype="text"/>
4098                         <field name="series_title" reporter:label="Series Title" reporter:datatype="text"/>
4099                         <field name="subject_geographic" reporter:label="Geographic Subject" reporter:datatype="text"/>
4100                         <field name="subject_name" reporter:label="Name Subject" reporter:datatype="text"/>
4101                         <field name="subject_temporal" reporter:label="Temporal Subject" reporter:datatype="text"/>
4102                         <field name="subject_topic" reporter:label="Topic Subject" reporter:datatype="text"/>
4103                         <field name="abstract" reporter:label="Abstract" reporter:datatype="text"/>
4104                         <field name="toc" reporter:label="Table of Contents" reporter:datatype="text"/>
4105                         <field name="pubdate" reporter:label="Publication Date" reporter:datatype="text"/>
4106                         <field name="type_of_resource" reporter:label="Type of Resource" reporter:datatype="text"/>
4107                 </fields>
4108                 <links>
4109                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4110                 </links>
4111                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4112                         <actions>
4113                                 <retrieve/>
4114                         </actions>
4115                 </permacrud>
4116         </class>
4117
4118         <class id="cdfm" controller="open-ils.cstore open-ils.pcrud" 
4119                 oils_persist:tablename="config.display_field_map"
4120                 oils_obj:fieldmapper="config::display_field_map"
4121                 oils_persist:field_safe="true"
4122                 reporter:label="Display Field Map">
4123                 <fields oils_persist:primary="name">
4124                         <field name="name" reporter:datatype="text"/>
4125                         <field name="field" reporter:datatype="link"/>
4126                         <field name="multi" reporter:datatype="bool"/>
4127                 </fields>
4128                 <links>
4129                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4130                 </links>
4131                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4132                         <actions>
4133                                 <retrieve/>
4134                                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
4135                                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
4136                                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
4137                         </actions>
4138                 </permacrud>
4139         </class>
4140
4141         <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">
4142                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
4143                         <field name="id" reporter:datatype="id" />
4144                         <field name="field" reporter:datatype="link"/>
4145                         <field name="source" reporter:datatype="link"/>
4146                         <field name="value"  reporter:datatype="text"/>
4147                 </fields>
4148                 <links>
4149                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4150                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4151                 </links>
4152         </class>
4153         <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">
4154                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
4155                         <field name="id" reporter:datatype="id" />
4156                         <field name="value" reporter:datatype="text"/>
4157                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4158                 </fields>
4159                 <links>
4160                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
4161                 </links>
4162                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4163                         <actions>
4164                                 <retrieve/>
4165                         </actions>
4166                 </permacrud>
4167         </class>
4168         <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">
4169                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
4170                         <field name="id" reporter:datatype="id" />
4171                         <field name="entry" reporter:datatype="link"/>
4172                         <field name="def" reporter:datatype="link"/>
4173                         <field name="source" reporter:datatype="link"/>
4174                 </fields>
4175                 <links>
4176                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4177                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
4178                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4179                 </links>
4180         </class>
4181         <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">
4182                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
4183                         <field name="id" reporter:datatype="id" />
4184                         <field name="entry" reporter:datatype="link"/>
4185                         <field name="simple_heading" reporter:datatype="link"/>
4186                 </fields>
4187                 <links>
4188                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
4189                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
4190                 </links>
4191         </class>
4192         <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">
4193                 <oils_persist:source_definition><![CDATA[
4194                         SELECT * FROM metabib.author_field_entry
4195                                                 UNION ALL
4196                         SELECT * FROM metabib.keyword_field_entry
4197                                                 UNION ALL
4198                         SELECT * FROM metabib.identifier_field_entry
4199                                                 UNION ALL
4200                         SELECT * FROM metabib.title_field_entry
4201                                                 UNION ALL
4202                         SELECT * FROM metabib.subject_field_entry
4203                                                 UNION ALL
4204                         SELECT * FROM metabib.series_field_entry
4205                 ]]></oils_persist:source_definition>
4206                 <fields>
4207                         <field name="field" reporter:datatype="link"/>
4208                         <field name="id" reporter:datatype="id" />
4209                         <field name="source" reporter:datatype="link"/>
4210                         <field name="value"  reporter:datatype="text"/>
4211                 </fields>
4212                 <links>
4213                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4214                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4215                 </links>
4216         </class>
4217         <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">
4218                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
4219                         <field name="field" reporter:datatype="link"/>
4220                         <field name="id" reporter:datatype="id" />
4221                         <field name="source" reporter:datatype="link"/>
4222                         <field name="value"  reporter:datatype="text"/>
4223                 </fields>
4224                 <links>
4225                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4226                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4227                 </links>
4228         </class>
4229         <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">
4230                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4231                         <field name="accepting_usr" reporter:datatype="link"/>
4232                         <field name="amount" reporter:datatype="money" />
4233                         <field name="amount_collected" reporter:datatype="money" />
4234                         <field name="cash_drawer" reporter:datatype="link"/>
4235                         <field name="id" reporter:datatype="id" />
4236                         <field name="note"  reporter:datatype="text"/>
4237                         <field name="payment_ts" reporter:datatype="timestamp"/>
4238                         <field name="xact" reporter:datatype="link"/>
4239                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4240                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4241                 </fields>
4242                 <links>
4243                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4244                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4245                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4246                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4247                 </links>
4248         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4249             <actions>
4250                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4251                     <context link="xact" jump="usr" field="home_ou"/>
4252                 </retrieve>
4253                         </actions>
4254                 </permacrud>
4255         </class>
4256         <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">
4257                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4258                         <field name="accepting_usr" reporter:datatype="link"/>
4259                         <field name="amount" reporter:datatype="money" />
4260                         <field name="amount_collected" reporter:datatype="money" />
4261                         <field name="id" reporter:datatype="id" />
4262                         <field name="note"  reporter:datatype="text"/>
4263                         <field name="payment_ts" reporter:datatype="timestamp"/>
4264                         <field name="xact" reporter:datatype="link"/>
4265                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4266                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4267                 </fields>
4268                 <links>
4269                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4270                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4271                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4272                 </links>
4273         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4274             <actions>
4275                 <retrieve permission="VIEW_USER_TRANSACTIONS">
4276                     <context link="xact" jump="usr" field="home_ou"/>
4277                 </retrieve>
4278                         </actions>
4279                 </permacrud>
4280         </class>
4281         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
4282                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4283                         <field name="accepting_usr" reporter:datatype="link"/>
4284                         <field name="amount" reporter:datatype="money" />
4285                         <field name="amount_collected" reporter:datatype="money" />
4286                         <field name="id" reporter:datatype="id" />
4287                         <field name="note"  reporter:datatype="text"/>
4288                         <field name="payment_ts" reporter:datatype="timestamp"/>
4289                         <field name="xact" reporter:datatype="link"/>
4290                         <field name="billing" reporter:datatype="link"/>
4291                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4292                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4293                 </fields>
4294                 <links>
4295                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4296                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4297                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4298                         <link field="billing" reltype="might_have" key="id" class="mb"/>
4299                 </links>
4300         </class>
4301         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
4302                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
4303                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
4304                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4305                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4306                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
4307                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4308                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
4309                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
4310                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4311                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
4312                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
4313                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
4314                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
4315                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
4316                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
4317                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
4318                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
4319                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
4320                 </fields>
4321                 <links>
4322                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4323                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
4324                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
4325                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
4326                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
4327                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
4328                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
4329                 </links>
4330         </class>
4331
4332         <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">
4333                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
4334                         <field reporter:label="Penalty ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4335                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
4336                         <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
4337                         <field reporter:label="Block List" name="block_list" reporter:datatype="text"/>
4338                         <field reporter:label="Staff Alert" name="staff_alert" reporter:datatype="bool"/>
4339                         <field reporter:label="Org Depth" name="org_depth" reporter:datatype="int"/>
4340                         <field reporter:label="Ignore Proximity" name="ignore_proximity" reporter:datatype="int"/>
4341                 </fields>
4342                 <links/>
4343         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4344             <actions>
4345                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4346                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
4347                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4348                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
4349             </actions>
4350         </permacrud>
4351         </class>
4352         <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">
4353                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
4354                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
4355                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
4356                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
4357                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
4358                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
4359                 </fields>
4360                 <links>
4361                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
4362                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4363                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4364         </links>
4365         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4366             <actions>
4367                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4368                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4369                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4370                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
4371             </actions>
4372         </permacrud>
4373         </class>
4374         <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">
4375                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
4376                         <field name="holdable" reporter:datatype="bool"/>
4377                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
4378                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4379                         <field name="opac_visible" reporter:datatype="bool"/>
4380             <field name="copy_active" reporter:datatype="bool"/>
4381             <field name="restrict_copy_delete" reporter:datatype="bool"/>
4382             <field name="is_available" reporter:datatype="bool"/>
4383                 </fields>
4384                 <links/>
4385         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4386             <actions>
4387                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
4388                 <retrieve/>
4389                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
4390                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
4391             </actions>
4392         </permacrud>
4393         </class>
4394         <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">
4395                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
4396                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4397                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
4398                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
4399                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
4400                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
4401                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
4402                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
4403                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
4404                 </fields>
4405                 <links>
4406                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4407                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4408                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
4409                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
4410                 </links>
4411                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4412                         <actions>
4413                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4414                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4415                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4416                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4417                         </actions>
4418                 </permacrud>
4419         </class>
4420         <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">
4421                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
4422                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4423                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4424                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4425                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4426                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4427                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4428                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4429                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4430                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4431                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4432                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4433                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
4434                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
4435                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
4436                 </fields>
4437                 <links>
4438                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4439                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
4440                 </links>
4441                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4442                         <actions>
4443                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
4444                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
4445                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
4446                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
4447                         </actions>
4448                 </permacrud>
4449         </class>
4450         <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">
4451                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
4452                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
4453                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
4454                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
4455                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
4456                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
4457                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4458                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4459                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4460                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4461                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4462                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4463                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4464                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
4465                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
4466                 </fields>
4467                 <links>
4468                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4469                 </links>
4470                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4471                         <actions>
4472                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4473                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
4474                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4475                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
4476                         </actions>
4477                 </permacrud>
4478         </class>
4479
4480
4481         <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">
4482                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
4483                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4484                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4485                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4486                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4487                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
4488                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
4489                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
4490                 </fields>
4491                 <links>
4492                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4493                 </links>
4494         </class>
4495
4496         <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">
4497                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
4498                         <field name="call_number" />
4499                         <field name="create_date" reporter:datatype="timestamp"/>
4500                         <field name="creator" reporter:datatype="link"/>
4501                         <field name="id" reporter:datatype="id" />
4502                         <field name="pub" reporter:datatype="bool"/>
4503                         <field name="title"  reporter:datatype="text"/>
4504                         <field name="value"  reporter:datatype="text"/>
4505                 </fields>
4506                 <links>
4507                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4508                 </links>
4509         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4510             <actions>
4511                 <create permission="CREATE_VOLUME_NOTE">
4512                     <context link="call_number" field="owning_lib"/>
4513                 </create>
4514                 <retrieve permission="VIEW_VOLUME_NOTES">
4515                     <context link="call_number" field="owning_lib"/>
4516                 </retrieve>
4517                 <update permission="UPDATE_VOLUME_NOTE">
4518                     <context link="call_number" field="owning_lib"/>
4519                 </update>
4520                 <delete permission="DELETE_VOLUME_NOTE">
4521                     <context link="call_number" field="owning_lib"/>
4522                 </delete>
4523             </actions>
4524         </permacrud>
4525         </class>
4526         <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">
4527                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
4528                         <field name="create_date" reporter:datatype="timestamp"/>
4529                         <field name="creator" reporter:datatype="link"/>
4530                         <field name="edit_date" reporter:datatype="timestamp"/>
4531                         <field name="editor" reporter:datatype="link"/>
4532                         <field name="id" reporter:datatype="id" />
4533                         <field name="record" reporter:datatype="link"/>
4534                         <field name="value" reporter:datatype="text"/>
4535                 </fields>
4536                 <links>
4537                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4538                 </links>
4539         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4540             <actions>
4541                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4542                 <retrieve/>
4543                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4544                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
4545             </actions>
4546         </permacrud>
4547         </class>
4548         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
4549         <oils_persist:source_definition><![CDATA[
4550 SELECT  usr,
4551         SUM(
4552             CASE
4553                 WHEN (
4554                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4555                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4556                 ) THEN 1
4557                 ELSE 0
4558             END
4559         ) AS out,
4560
4561         SUM(
4562             CASE
4563                 WHEN (
4564                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4565                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4566                 ) THEN 1
4567                 ELSE 0
4568             END
4569         ) AS overdue,
4570
4571         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
4572         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
4573         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
4574   FROM  action.circulation
4575   WHERE checkin_time IS NULL
4576   GROUP BY 1
4577         ]]></oils_persist:source_definition>
4578         <fields oils_persist:primary="usr">
4579             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4580             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4581             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4582             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4583             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4584             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4585         </fields>
4586         <links>
4587             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4588         </links>
4589         </class>
4590         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4591         <oils_persist:source_definition><![CDATA[
4592 SELECT  usr,
4593         STRING_AGG(
4594             CASE
4595                 WHEN (
4596                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval < '1 day'  AND due_date > 'now'))
4597                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4598                 ) THEN id::TEXT
4599                 ELSE '0'
4600             END
4601         ,',') AS out,
4602
4603         STRING_AGG(
4604             CASE
4605                 WHEN (
4606                     ((fine_interval >= '1 day' AND due_date < 'today') OR (fine_interval < '1 day'  AND due_date < 'now'))
4607                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4608                 ) THEN id::TEXT
4609                 ELSE '0'
4610             END
4611         ,',') AS overdue,
4612
4613         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4614         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4615         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4616   FROM  action.circulation
4617   WHERE checkin_time IS NULL
4618   GROUP BY 1
4619         ]]></oils_persist:source_definition>
4620         <fields oils_persist:primary="usr">
4621             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4622             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4623             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4624             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4625             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4626             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4627         </fields>
4628         <links>
4629             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4630         </links>
4631         </class>
4632         <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">
4633                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4634                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4635                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4636                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4637                         <field reporter:label="Checkout / Renewal Library" name="circ_lib"  reporter:datatype="org_unit"/>
4638                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4639                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4640                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4641                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4642                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4643                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4644                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4645                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4646                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4647                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4648                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4649                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4650                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4651                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4652                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4653                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4654                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4655                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4656                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4657                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4658                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4659                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4660                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4661                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4662                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4663                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4664                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4665                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4666                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4667                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4668                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4669                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4670                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4671                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4672                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4673                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4674                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4675                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4676                 </fields>
4677                 <links>
4678                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4679                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4680                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4681                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4682                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4683                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4684                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4685                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4686                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4687                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4688                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4689                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4690                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4691                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4692                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4693                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4694                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4695                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4696                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4697                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4698                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4699                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4700                 </links>
4701                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4702                         <actions>
4703                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4704                         </actions>
4705                 </permacrud>
4706         </class>
4707         <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">
4708                 <fields>
4709                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
4710                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4711                         <field reporter:label="Circ ID" name="id" reporter:datatype="int" />
4712                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4713                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
4714                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
4715                         <field reporter:label="Item Type" name="item_type" reporter:datatype="text"/>
4716                 </fields>
4717                 <links>
4718                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4719                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4720                 </links>
4721                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4722                         <actions>
4723                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4724                         </actions>
4725                 </permacrud>
4726         </class>
4727         <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">
4728                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4729                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4730                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4731                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4732                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4733                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4734                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4735                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4736                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4737                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4738                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4739                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4740                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4741                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4742                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4743                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4744                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4745                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4746                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4747                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4748                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4749                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4750                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4751                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4752                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4753                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4754                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4755                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4756                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4757                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4758                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4759                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4760                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4761                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4762                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4763                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4764                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4765                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4766                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4767                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4768                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4769                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4770                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4771                 </fields>
4772                 <links>
4773                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4774                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4775                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4776                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4777                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4778                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4779                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
4780                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
4781                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4782                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4783                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4784                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4785                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4786                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4787                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4788                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4789                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4790                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4791                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4792                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4793                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4794                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4795                 </links>
4796                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4797                         <actions>
4798                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4799                         </actions>
4800                 </permacrud>
4801         </class>
4802
4803         <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">
4804                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4805                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4806                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4807                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4808                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4809                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4810                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4811                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4812                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4813                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4814                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4815                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4816                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4817                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4818                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4819                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4820                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4821                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4822                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4823                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4824                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4825                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4826                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4827                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4828                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4829                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4830                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4831                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4832                         <field reporter:label="Checkin Scan Time" name="checkin_scan_time" reporter:datatype="timestamp"/>
4833                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4834                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4835                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4836                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4837                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4838                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4839                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4840                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4841                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4842                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4843                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4844                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4845                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4846                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4847                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4848                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4849                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4850                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4851                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4852                         <field reporter:label="Linked Active Circulation" name="active_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4853                         <field reporter:label="Linked Aged Circulation" name="aged_circ" oils_persist:virtual="true" reporter:datatype="link"/>
4854                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4855                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4856                 </fields>
4857                 <links>
4858                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4859                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4860                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4861                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4862                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4863                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4864                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
4865                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
4866                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4867                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4868                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4869                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4870                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4871                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4872                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4873                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4874                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4875                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4876                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4877                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4878                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4879                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4880                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4881                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4882                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4883                         <link field="active_circ" reltype="might_have" key="id" map="" class="circ"/>
4884                         <link field="aged_circ" reltype="might_have" key="id" map="" class="acirc"/>
4885                         <link field="parent_circ" reltype="might_have" key="id" map="" class="acirc"/>
4886                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4887                 </links>
4888                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4889                         <actions>
4890                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4891                         </actions>
4892                 </permacrud>
4893         </class>
4894         <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">
4895                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4896                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4897                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4898                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4899                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4900                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4901                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4902                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4903                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4904                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4905                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4906                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4907                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4908                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4909                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4910                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4911                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4912                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4913                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4914                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4915                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4916                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4917                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4918                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4919                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4920                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4921                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4922                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4923                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4924                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4925                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4926                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4927                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4928                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4929                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4930                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4931                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4932                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4933                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4934                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4935                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4936                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4937                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4938                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4939                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4940                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4941                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4942                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
4943                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
4944                 </fields>
4945                 <links>
4946                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4947                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4948                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4949                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4950                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4951                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4952                         <link field="payments" reltype="has_many" key="xact" map="" class="mallp"/>
4953                         <link field="billings" reltype="has_many" key="xact" map="" class="mallb"/>
4954                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4955                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4956                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4957                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4958                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4959                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4960                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4961                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4962                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4963                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4964                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4965                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4966                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4967                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4968                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4969                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4970                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4971                 </links>
4972         </class>
4973         <class id="auch" 
4974                 controller="open-ils.cstore" 
4975                 oils_obj:fieldmapper="action::user_circ_history" 
4976                 oils_persist:tablename="action.usr_circ_history" 
4977                 reporter:label="User Checkout History">
4978                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4979                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4980                         <!-- prevent reporting on the user that owns the checkout history -->
4981                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4982                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4983                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4984                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4985                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4986                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4987                 </fields>
4988                 <links>
4989                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4990                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4991                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4992                 </links>
4993         </class>
4994         <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">
4995                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4996                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4997                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
4998                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4999                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5000                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5001                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5002                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
5003                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
5004                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
5005                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
5006                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5007                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5008                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5009                 </fields>
5010                 <links>
5011                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5012                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5013                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
5014                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
5015                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
5016                 </links>
5017                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5018                         <actions>
5019                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5020                                 <retrieve permission="VIEW_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5021                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5022                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
5023                         </actions>
5024                 </permacrud>
5025         </class>
5026
5027         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
5028                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
5029                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
5030                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5031                         <field reporter:label="Resource Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
5032                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
5033                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" oils_obj:required="true"/>
5034                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5035                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5036                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
5037                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5038                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5039                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
5040                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
5041                 </fields>
5042                 <links>
5043                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5044                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
5045                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
5046                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
5047                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
5048                 </links>
5049                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5050                         <actions>
5051                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5052                                 <retrieve permission="VIEW_BOOKING_RESOURCE" context_field='owner'/>
5053                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5054                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
5055                         </actions>
5056                 </permacrud>
5057         </class>
5058         
5059         <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">
5060                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
5061                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
5062                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5063                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
5064                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
5065                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
5066                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
5067                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5068                 </fields>
5069                 <links>
5070                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5071                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
5072                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
5073                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
5074                 </links>
5075                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5076                         <actions>
5077                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5078                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5079                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5080                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
5081                         </actions>
5082                 </permacrud>
5083         </class>
5084         
5085         <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">
5086                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
5087                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
5088                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
5089                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link" oils_obj:required="true"/>
5090                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text" oils_obj:required="true"/>
5091                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5092                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5093                 </fields>
5094                 <links>
5095                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5096                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
5097                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
5098                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
5099                 </links>
5100                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5101                         <actions>
5102                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5103                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5104                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5105                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
5106                         </actions>
5107                 </permacrud>
5108         </class>
5109         
5110         <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">
5111                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
5112                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
5113                         <field reporter:label="Resource" name="resource" reporter:datatype="link" oils_obj:required="true"/>
5114                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link" oils_obj:required="true"/>
5115                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link" oils_obj:required="true"/>
5116                 </fields>
5117                 <links>
5118                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
5119                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
5120                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
5121                 </links>
5122                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5123                         <actions>
5124                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5125                     <context link="resource" field="owner" />
5126                 </create>
5127                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5128                     <context link="resource" field="owner" />
5129                 </retrieve>
5130                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5131                     <context link="resource" field="owner" />
5132                 </update>
5133                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
5134                     <context link="resource" field="owner" />
5135                 </delete>
5136                         </actions>
5137                 </permacrud>
5138         </class>
5139         
5140         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
5141                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5142                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5143                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5144                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5145                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5146                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5147                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5148                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5149                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5150                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5151                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5152                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
5153                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5154                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp" oils_obj:required="true"/>
5155                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
5156                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
5157                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
5158                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
5159                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
5160                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
5161                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
5162                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
5163                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
5164                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
5165                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
5166                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
5167                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
5168                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
5169                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5170                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5171                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5172                 </fields>
5173                 <links>
5174                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5175                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5176                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5177                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5178                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5179                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5180                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
5181                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5182                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
5183                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5184                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5185                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
5186                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
5187                 </links>
5188                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5189                         <actions>
5190                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5191                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5192                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5193                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
5194                         </actions>
5195                 </permacrud>
5196         </class>
5197         
5198         <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">
5199                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
5200                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
5201                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
5202                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
5203                 </fields>
5204                 <links>
5205                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5206                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
5207                 </links>
5208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5209                         <actions>
5210                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5211                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
5212                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5213                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
5214                         </actions>
5215                 </permacrud>
5216         </class>
5217
5218         <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">
5219                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
5220                         <field name="bucket" reporter:datatype="link"/>
5221                         <field name="id" reporter:datatype="id" />
5222                         <field name="target_call_number" reporter:datatype="link" />
5223                         <field name="create_time" reporter:datatype="timestamp" />
5224                         <field name="pos" reporter:datatype="int" />
5225                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5226                 </fields>
5227                 <links>
5228                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
5229                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5230             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
5231                 </links>
5232                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5233                         <actions>
5234                                 <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
5235                     <context link="bucket" owning_lib="owning_lib"/>
5236                 </retrieve>
5237             </actions>
5238         </permacrud>
5239         </class>
5240         <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">
5241                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
5242                         <field name="id" reporter:datatype="id" />
5243                         <field name="item" reporter:datatype="link"/>
5244                         <field name="note" reporter:datatype="text" />
5245                 </fields>
5246                 <links>
5247                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
5248                 </links>
5249         </class>
5250         <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">
5251                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
5252                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5253                         <field name="btype" reporter:datatype="text"/>
5254                         <field name="id" reporter:datatype="id" />
5255                         <field name="name" reporter:datatype="text"/>
5256                         <field name="description" reporter:datatype="text"/>
5257                         <field name="owner" reporter:datatype="link"/>
5258                         <field name="pub" reporter:datatype="bool"/>
5259                         <field name="create_time" reporter:datatype="timestamp" />
5260                         <field name="owning_lib" reporter:datatype="org_unit" />
5261                 </fields>
5262                 <links>
5263                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5264                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5265                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
5266                 </links>
5267                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5268                         <actions>
5269                                 <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5270                                 <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5271                                 <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5272                                 <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
5273                         </actions>
5274                 </permacrud>
5275         </class>
5276         <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">
5277                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
5278                         <field name="id" reporter:datatype="id" />
5279                         <field name="bucket" reporter:datatype="link"/>
5280                         <field name="note" reporter:datatype="text" />
5281                 </fields>
5282                 <links>
5283                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5284                 </links>
5285         </class>
5286         <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">
5287                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
5288                         <field name="hold" reporter:datatype="link"/>
5289                         <field name="id" reporter:datatype="id" />
5290                         <field name="target_copy" reporter:datatype="link"/>
5291                         <field name="proximity" reporter:datatype="number"/>
5292                 </fields>
5293                 <links>
5294                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5295                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5296                 </links>
5297         </class>
5298         <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">
5299                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
5300                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5301                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
5302                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
5303                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
5304                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
5305                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
5306                 </fields>
5307                 <links>
5308                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5309                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
5310                 </links>
5311         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5312             <actions>
5313                 <create permission="CREATE_HOLD_NOTIFICATION">
5314                                         <context link="hold" jump="usr" field="home_ou" />
5315                                 </create>
5316                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
5317                                         <context link="hold" jump="usr" field="home_ou" />
5318                                 </retrieve>
5319                 <update permission="CREATE_HOLD_NOTIFICATION">
5320                                         <context link="hold" jump="usr" field="home_ou" />
5321                                 </update>
5322                 <delete permission="CREATE_HOLD_NOTIFICATION">
5323                                         <context link="hold" jump="usr" field="home_ou" />
5324                                 </delete>
5325             </actions>
5326         </permacrud>
5327         </class>
5328         <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">
5329                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
5330                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
5331                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
5332                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
5333                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5334                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5335                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5336                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
5337                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
5338                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
5339                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
5340                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
5341                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
5342                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
5343                         <field reporter:label="URL" name="url" reporter:datatype="text" />
5344                 </fields>
5345                 <links>
5346                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5347                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
5348                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
5349                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
5350                 </links>
5351         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5352             <actions>
5353                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
5354                 <retrieve/>
5355                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
5356                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
5357             </actions>
5358         </permacrud>
5359         </class>
5360         <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">
5361                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
5362                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5363                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5364                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5365                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
5366             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5367             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
5368             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5369                 </fields>
5370                 <links>
5371                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5372                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
5373                 </links>
5374         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5375             <actions>
5376                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5377                 <retrieve/>
5378                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5379                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
5380             </actions>
5381         </permacrud>
5382         </class>
5383         <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">
5384                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
5385                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5386             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
5387             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
5388                 </fields>
5389                 <links>
5390                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
5391                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5392                 </links>
5393         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5394             <actions>
5395                 <create permission="ADMIN_COPY_LOCATION_GROUP">
5396                                         <context link="lgroup" field="owner" />
5397                 </create>
5398                 <retrieve/>
5399                 <update permission="ADMIN_COPY_LOCATION_GROUP">
5400                                         <context link="lgroup" field="owner" />
5401                 </update>
5402                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
5403                                         <context link="lgroup" field="owner" />
5404                 </delete>
5405             </actions>
5406         </permacrud>
5407         </class>
5408
5409     <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">
5410         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
5411             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
5412             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
5413             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
5414             <field reporter:label="Position" name="position" reporter:datatype="int"/>
5415         </fields>
5416         <links>
5417             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5418             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
5419         </links>
5420         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5421             <actions>
5422                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5423                 <retrieve/>
5424                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5425                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
5426             </actions>
5427         </permacrud>
5428     </class>
5429
5430         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
5431                 <fields>
5432                         <field name="sre_id" oils_persist:virtual="true" />
5433                         <field name="location" oils_persist:virtual="true" />
5434                         <field name="owning_lib" oils_persist:virtual="true" />
5435                         <field name="basic_holdings" oils_persist:virtual="true" />
5436                         <field name="basic_holdings_add" oils_persist:virtual="true" />
5437                         <field name="supplement_holdings" oils_persist:virtual="true" />
5438                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
5439                         <field name="index_holdings" oils_persist:virtual="true" />
5440                         <field name="index_holdings_add" oils_persist:virtual="true" />
5441                         <field name="online" oils_persist:virtual="true" />
5442                         <field name="missing" oils_persist:virtual="true" />
5443                         <field name="incomplete" oils_persist:virtual="true" />
5444                 </fields>
5445         </class>
5446
5447         <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">
5448                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
5449                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
5450                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
5451                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5452                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5453                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5454                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
5455                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5456                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5457                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
5458                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
5459                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
5460                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
5461                 </fields>
5462                 <links>
5463                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5464                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5465                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5466                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5467                 </links>
5468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5469                         <actions>
5470                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
5471                                 <retrieve/>
5472                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
5473                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
5474                         </actions>
5475                 </permacrud>
5476         </class>
5477
5478         <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">
5479                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
5480                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5481                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5482                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
5483                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5484                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5485                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5486                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
5487                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
5488                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
5489                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
5490                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
5491                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
5492                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
5493                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
5494                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
5495                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
5496                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
5497                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
5498                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
5499                 </fields>
5500                 <links>
5501                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5502                 </links>
5503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5504                         <actions>
5505                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
5506                                         <context link="subscription" field="owning_lib" />
5507                                 </create>
5508                                 <retrieve />
5509                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
5510                                         <context link="subscription" field="owning_lib" />
5511                                 </update>
5512                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
5513                                         <context link="subscription" field="owning_lib" />
5514                                 </delete>
5515                         </actions>
5516                 </permacrud>
5517         </class>
5518
5519         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
5520                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
5521                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5522                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5523                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
5524                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
5525                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
5526                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
5527                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
5528                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
5529                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
5530                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5531                 </fields>
5532                 <links>
5533                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5534                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
5535                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
5536                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
5537                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
5538                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
5539                 </links>
5540                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5541                         <actions>
5542                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5543                                 <retrieve />
5544                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5545                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
5546                         </actions>
5547                 </permacrud>
5548         </class>
5549
5550         <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">
5551                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
5552                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5553                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5554                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5555                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5556                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5557                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5558                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5559                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5560                 </fields>
5561                 <links>
5562                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5563                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5564                 </links>
5565                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5566                         <actions>
5567                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5568                     <context link="subscription" field="owning_lib"/>
5569                 </create>
5570                                 <retrieve />
5571                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5572                     <context link="subscription" field="owning_lib"/>
5573                 </update>
5574                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib">
5575                     <context link="subscription" field="owning_lib"/>
5576                 </delete>
5577                         </actions>
5578                 </permacrud>
5579         </class>
5580
5581         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
5582                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
5583                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5584                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
5585                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
5586                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5587                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
5588                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5589                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
5590                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
5591                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
5592                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
5593                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
5594                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
5595                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
5596                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
5597                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5598                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5599                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5600                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
5601                 </fields>
5602                 <links>
5603                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
5604                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5605                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
5606                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
5607                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
5608                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
5609                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
5610                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
5611                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
5612                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
5613                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
5614                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
5615                 </links>
5616                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5617                         <actions>
5618                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5619                                 <retrieve />
5620                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5621                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
5622                         </actions>
5623                 </permacrud>
5624         </class>
5625
5626         <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">
5627                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
5628                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5629                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5630                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5631                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5632                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5633                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5634                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5635                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5636                 </fields>
5637                 <links>
5638                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5639                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5640                 </links>
5641                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5642                         <actions>
5643                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5644                                         <context link="distribution" field="holding_lib" />
5645                                 </create>
5646                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
5647                                         <context link="distribution" field="holding_lib" />
5648                                 </retrieve>
5649                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5650                                         <context link="distribution" field="holding_lib" />
5651                                 </update>
5652                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5653                                         <context link="distribution" field="holding_lib" />
5654                                 </delete>
5655                         </actions>
5656                 </permacrud>
5657         </class>
5658
5659         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
5660                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
5661                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5662                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5663                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
5664                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5665                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
5666                 </fields>
5667                 <links>
5668                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5669                         <link field="items" reltype="has_many" key="stream" map="" class="sitem"/>
5670                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
5671                 </links>
5672                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5673                         <actions>
5674                                 <create permission="ADMIN_SERIAL_STREAM">
5675                                         <context link="distribution" field="holding_lib" />
5676                                 </create>
5677                                 <retrieve />
5678                                 <update permission="ADMIN_SERIAL_STREAM">
5679                                         <context link="distribution" field="holding_lib" />
5680                                 </update>
5681                                 <delete permission="ADMIN_SERIAL_STREAM">
5682                                         <context link="distribution" field="holding_lib" />
5683                                 </delete>
5684                         </actions>
5685                 </permacrud>
5686         </class>
5687
5688         <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">
5689                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
5690                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5691                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5692                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
5693                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
5694                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
5695                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5696                 </fields>
5697                 <links>
5698                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5699                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
5700                 </links>
5701                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5702                         <actions>
5703                                 <create permission="ADMIN_SERIAL_STREAM">
5704                                         <context link="stream" jump="distribution" field="holding_lib" />
5705                                 </create>
5706                                 <retrieve permission="RECEIVE_SERIAL">
5707                                         <context link="stream" jump="distribution" field="holding_lib" />
5708                                 </retrieve>
5709                                 <update permission="ADMIN_SERIAL_STREAM">
5710                                         <context link="stream" jump="distribution" field="holding_lib" />
5711                                 </update>
5712                                 <delete permission="ADMIN_SERIAL_STREAM">
5713                                         <context link="stream" jump="distribution" field="holding_lib" />
5714                                 </delete>
5715                         </actions>
5716                 </permacrud>
5717         </class>
5718
5719         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
5720                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
5721                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5722                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5723                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5724                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5725                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5726                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
5727                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
5728                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
5729                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
5730                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
5731                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
5732                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
5733                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
5734                 </fields>
5735                 <links>
5736                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5737                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5738                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5739                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5740                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5741                 </links>
5742                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5743                         <actions>
5744                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5745                                         <context link="subscription" field="owning_lib" />
5746                                 </create>
5747                                 <retrieve/>
5748                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5749                                         <context link="subscription" field="owning_lib" />
5750                                 </update>
5751                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5752                                         <context link="subscription" field="owning_lib" />
5753                                 </delete>
5754                         </actions>
5755                 </permacrud>
5756         </class>
5757
5758         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5759                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5760                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5761                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5762                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5763                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5764                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5765                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5766                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5767                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5768                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5769                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5770                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5771                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5772                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5773                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5774                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5775                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5776                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5777                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5778                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5779                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5780                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5781                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5782                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5783                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5784                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5785                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5786                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5787                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5788                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5789                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5790                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5791                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5792                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5793                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5794                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5795                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5796                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5797                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5798                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5799                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5800                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5801                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5802                 </fields>
5803                 <links>
5804                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5805                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5806                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5807                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5808                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5809                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5810                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5811                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5812                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5813                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5814                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5815                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5816                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5817                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5818                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5819                 </links>
5820                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5821                         <actions>
5822                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5823                                 <retrieve/>
5824                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5825                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5826                         </actions>
5827                 </permacrud>
5828         </class>
5829
5830         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5831                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5832                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5833                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5834                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5835                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5836                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5837                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5838                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5839                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5840                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5841                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5842                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5843                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5844                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5845                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5846                 </fields>
5847                 <links>
5848                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5849                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5850                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5851                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5852                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5853                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5854                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5855                 </links>
5856                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5857                         <actions>
5858                                 <create permission="ADMIN_SERIAL_ITEM">
5859                                         <context link="stream" jump="distribution" field="holding_lib" />
5860                                 </create>
5861                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5862                                         <context link="stream" jump="distribution" field="holding_lib" />
5863                                 </retrieve>
5864                                 <update permission="ADMIN_SERIAL_ITEM">
5865                                         <context link="stream" jump="distribution" field="holding_lib" />
5866                                 </update>
5867                                 <delete permission="ADMIN_SERIAL_ITEM">
5868                                         <context link="stream" jump="distribution" field="holding_lib" />
5869                                 </delete>
5870                         </actions>
5871                 </permacrud>
5872         </class>
5873
5874         <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">
5875                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5876                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5877                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5878                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5879                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5880                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5881                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5882                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5883                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5884                 </fields>
5885                 <links>
5886                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5887                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5888                 </links>
5889                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5890                         <actions>
5891                                 <create permission="ADMIN_SERIAL_ITEM">
5892                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5893                                 </create>
5894                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5895                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5896                                 </retrieve>
5897                                 <update permission="ADMIN_SERIAL_ITEM">
5898                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5899                                 </update>
5900                                 <delete permission="ADMIN_SERIAL_ITEM">
5901                                         <context link="item" jump="stream.distribution" field="holding_lib" />
5902                                 </delete>
5903                         </actions>
5904                 </permacrud>
5905         </class>
5906         <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">
5907                 <fields>
5908                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5909                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5910                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5911                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5912                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5913                 </fields>
5914                 <links>
5915                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5916                 </links>
5917         </class>
5918         <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">
5919                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5920                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5921                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5922                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5923                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5924                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5925                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5926                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5927                 </fields>
5928                 <links>
5929                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5930                 </links>
5931         </class>
5932         <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">
5933                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5934                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5935                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5936                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5937                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5938                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5939                 </fields>
5940                 <links>
5941                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5942                 </links>
5943                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5944                         <actions>
5945                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5946                                         <context link="distribution" field="holding_lib" />
5947                                 </create>
5948                                 <retrieve/>
5949                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5950                                         <context link="distribution" field="holding_lib" />
5951                                 </update>
5952                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5953                                         <context link="distribution" field="holding_lib" />
5954                                 </delete>
5955                         </actions>
5956                 </permacrud>
5957         </class>
5958
5959         <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">
5960                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5961                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5962                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5963                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5964                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5965                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5966                 </fields>
5967                 <links>
5968                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5969                 </links>
5970                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5971                         <actions>
5972                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5973                                         <context link="distribution" field="holding_lib" />
5974                                 </create>
5975                                 <retrieve/>
5976                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5977                                         <context link="distribution" field="holding_lib" />
5978                                 </update>
5979                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5980                                         <context link="distribution" field="holding_lib" />
5981                                 </delete>
5982                         </actions>
5983                 </permacrud>
5984         </class>
5985
5986         <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">
5987                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5988                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5989                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5990                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5991                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5992                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5993                 </fields>
5994                 <links>
5995                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5996                 </links>
5997                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5998                         <actions>
5999                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
6000                                         <context link="distribution" field="holding_lib" />
6001                                 </create>
6002                                 <retrieve/>
6003                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
6004                                         <context link="distribution" field="holding_lib" />
6005                                 </update>
6006                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
6007                                         <context link="distribution" field="holding_lib" />
6008                                 </delete>
6009                         </actions>
6010                 </permacrud>
6011         </class>
6012
6013         <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">
6014                 <fields oils_persist:primary="id" oils_persist:sequence="serial.pattern_template_id_seq">
6015                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6016                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
6017                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text" oils_obj:required="true"/>
6018                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
6019                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
6020                 </fields>
6021                 <links>
6022                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6023                 </links>
6024                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6025                         <actions>
6026                                 <create permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6027                                 <retrieve/>
6028                                 <update permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6029                                 <delete permission="ADMIN_SERIAL_PATTERN_TEMPLATE" context_field="owning_lib"/>
6030                         </actions>
6031                 </permacrud>
6032         </class>
6033
6034         <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">
6035                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
6036                         <field name="id" reporter:datatype="id" />
6037                         <field name="owning_copy" reporter:datatype="link"/>
6038                         <field name="stat_cat" reporter:datatype="link"/>
6039                         <field name="stat_cat_entry" reporter:datatype="link"/>
6040                 </fields>
6041                 <links>
6042                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
6043                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
6044                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6045                 </links>
6046                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6047                         <actions>
6048                                 <retrieve/>
6049                         </actions>
6050                 </permacrud>
6051         </class>
6052         <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">
6053                 <fields oils_persist:primary="code">
6054                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
6055                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6056                 </fields>
6057                 <links/>
6058         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6059             <actions>
6060                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
6061                 <retrieve/>
6062                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
6063                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
6064             </actions>
6065         </permacrud>
6066         </class>
6067         <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">
6068                 <fields oils_persist:primary="code">
6069                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
6070                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
6071                 </fields>
6072                 <links/>
6073         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6074             <actions>
6075                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6076                 <retrieve/>
6077                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6078                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6079             </actions>
6080         </permacrud>
6081         </class>
6082         <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">
6083                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
6084                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
6085                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
6086                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
6087                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
6088                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
6089                 </fields>
6090                 <links>
6091             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6092         </links>
6093         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6094             <actions>
6095                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6096                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6097                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6098                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
6099             </actions>
6100         </permacrud>
6101         </class>
6102         <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">
6103                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
6104                         <field name="id" reporter:datatype="id" />
6105                         <field name="name" reporter:datatype="text"/>
6106                 </fields>
6107                 <links/>
6108         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6109             <actions>
6110                 <create permission="CREATE_LASSO" global_required="true"/>
6111                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
6112                 <update permission="UPDATE_LASSO" global_required="true"/>
6113                 <delete permission="DELETE_LASSO" global_required="true"/>
6114             </actions>
6115         </permacrud>
6116         </class>
6117         <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">
6118                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
6119                         <field name="id" reporter:datatype="id" />
6120                         <field name="lasso" reporter:datatype="link"/>
6121                         <field name="org_unit" reporter:datatype="org_unit"/>
6122                 </fields>
6123                 <links>
6124                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
6125                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6126                 </links>
6127         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6128             <actions>
6129                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
6130                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
6131                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
6132                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
6133             </actions>
6134         </permacrud>
6135         </class>
6136         <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">
6137                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
6138                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6139                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
6140                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
6141                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
6142                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
6143                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
6144                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
6145                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
6146                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
6147                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
6148                 </fields>
6149                 <links>
6150                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6151                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6152                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6153                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
6154                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
6155                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
6156                 </links>
6157         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6158             <actions>
6159                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6160                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6161                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6162                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
6163             </actions>
6164         </permacrud>
6165         </class>
6166         <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">
6167                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6168                         <field name="id" reporter:datatype="id" />
6169                         <field name="from_org" reporter:datatype="org_unit"/>
6170                         <field name="to_org" reporter:datatype="org_unit"/>
6171                         <field name="prox" reporter:datatype="int" />
6172                 </fields>
6173                 <links>
6174                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
6175                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
6176                 </links>
6177         </class>
6178         <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">
6179                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
6180                         <field reporter:label="ID" name="id" reporter:datatype="id" />
6181                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
6182                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6183                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
6184                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
6185                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
6186                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
6187                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
6188                 </fields>
6189                 <links/>
6190         </class>
6191         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
6192                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
6193                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
6194                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6195                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6196                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
6197                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
6198                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6199                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
6200                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6201                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
6202                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
6203                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
6204                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
6205                 </fields>
6206                 <links>
6207                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6208                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
6209                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
6210                 </links>
6211         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6212             <actions>
6213                 <create permission="ADMIN_SURVEY" context_field="owner"/>
6214                 <retrieve/>
6215                 <update permission="ADMIN_SURVEY" context_field="owner"/>
6216                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
6217             </actions>
6218         </permacrud>
6219         </class>
6220         <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">
6221                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
6222                         <field name="address_type" reporter:label="Address Type" reporter:datatype="text" oils_obj:required="true" />
6223                         <field name="city" reporter:label="City" reporter:datatype="text" oils_obj:required="true"/>
6224                         <field name="country" reporter:label="Country" reporter:datatype="text" oils_obj:required="true"/>
6225                         <field name="county" reporter:label="County" reporter:datatype="text"/>
6226                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6227                         <field name="org_unit" reporter:label="Org Unit" reporter:datatype="org_unit" oils_obj:required="true"/>
6228                         <field name="post_code" reporter:label="Post Code" reporter:datatype="text" oils_obj:required="true"/>
6229                         <field name="state" reporter:label="State" reporter:datatype="text"/>
6230                         <field name="street1" reporter:label="Street1" reporter:datatype="text" oils_obj:required="true"/>
6231                         <field name="street2" reporter:label="Street2" reporter:datatype="text"/>
6232                         <field name="valid" reporter:label="Is Valid?" reporter:datatype="bool" oils_obj:required="true"/>
6233                         <field name="san" reporter:label="SAN" reporter:datatype="text"/>
6234                 </fields>
6235                 <links>
6236                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6237                 </links>
6238         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6239             <actions>
6240                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
6241                 <retrieve/>
6242                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
6243                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
6244             </actions>
6245         </permacrud>
6246         </class>
6247         <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">
6248                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
6249                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6250                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6251                         <field name="query_text" reporter:datatype="text"/>
6252                 </fields>
6253         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6254             <actions>
6255                 <retrieve/>
6256             </actions>
6257         </permacrud>
6258         </class>
6259
6260         <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">
6261                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
6262                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
6263                         <field name="owner" reporter:datatype="org_unit"/>
6264                         <field name="code" reporter:datatype="text"/>
6265                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
6266                         <field name="create_date" reporter:datatype="timestamp"/>
6267                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6268                 </fields>
6269                 <links>
6270                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6271                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
6272                 </links>
6273         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6274             <actions>
6275                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6276                 <retrieve/>
6277                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6278                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
6279             </actions>
6280         </permacrud>
6281         </class>
6282         <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">
6283                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
6284                         <field name="id" reporter:datatype="id"/>
6285                         <field name="grp" reporter:datatype="link"/>
6286                         <field name="pos" reporter:datatype="int"/>
6287                         <field name="query" reporter:datatype="link"/>
6288                 </fields>
6289                 <links>
6290                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
6291                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
6292                 </links>
6293         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6294             <actions>
6295                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
6296                     <context link="grp" field="owner"/>
6297                 </create>
6298                 <retrieve/>
6299                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
6300                     <context link="grp" field="owner"/>
6301                 </update>
6302                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
6303                     <context link="grp" field="owner"/>
6304                 </delete>
6305             </actions>
6306         </permacrud>
6307         </class>
6308
6309         <!-- A note: Please update alhr and ahopl when updating ahr -->
6310         <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">
6311                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6312                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6313                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6314                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6315                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6316                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6317                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6318                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6319                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6320                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6321                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6322                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6323                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6324                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6325                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6326                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6327                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6328                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6329                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6330                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6331                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6332                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6333                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6334                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6335                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6336                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6337                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6338                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6339                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6340                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6341                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6342                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6343                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6344                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6345                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6346                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6347                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6348                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6349                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6350                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6351                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6352                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6353                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6354                 </fields>
6355                 <links>
6356                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6357                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6358                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6359                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6360                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6361                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6362                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6363                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6364                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6365                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6366                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6367                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6368                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6369                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6370                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6371                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6372                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6373                         <link field="hold_type" reltype="has_a" key="hold_type" map="" class="cht"/>
6374                 </links>
6375                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6376                         <actions>
6377                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6378                         </actions>
6379                 </permacrud>
6380         </class>
6381         <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">
6382                 <oils_persist:source_definition><![CDATA[
6383                 SELECT
6384                         ahr.*,
6385                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
6386                                 copy_location_order_position,
6387                         CASE WHEN au.alias IS NOT NULL THEN
6388                                 au.alias
6389                         ELSE
6390                                 au.first_given_name
6391                         END AS usr_alias_or_first_given_name,
6392                         au.first_given_name AS usr_first_given_name,
6393                         au.second_given_name AS usr_second_given_name,
6394                         au.family_name AS usr_family_name,
6395                         au.prefix AS usr_prefix,
6396                         au.suffix AS usr_suffix,
6397                         au.alias AS usr_alias,
6398                         CASE WHEN au.alias IS NOT NULL THEN
6399                                 au.alias
6400                         ELSE
6401                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6402                                         COALESCE(au.family_name, ''),
6403                                         COALESCE(au.suffix, ''),
6404                                         ', ',
6405                                         COALESCE(au.prefix, ''),
6406                                         COALESCE(au.first_given_name, ''),
6407                                         COALESCE(au.second_given_name, '')
6408                                 ], ' '), E'\\s+,', ',')
6409                         END AS usr_alias_or_display_name,
6410                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
6411                                 COALESCE(au.family_name, ''),
6412                                 COALESCE(au.suffix, ''),
6413                                 ', ',
6414                                 COALESCE(au.prefix, ''),
6415                                 COALESCE(au.first_given_name, ''),
6416                                 COALESCE(au.second_given_name, '')
6417                         ], ' '), E'\\s+,', ',') AS usr_display_name,
6418                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
6419                                 AS call_number_label,
6420                         siss.label AS issuance_label,
6421                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
6422                         ahcm_1.copy_count AS potential_copies
6423                 FROM action.hold_request ahr
6424                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
6425                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
6426                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
6427                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
6428                 JOIN actor.usr au ON (au.id = ahr.usr)
6429                 JOIN (
6430                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
6431                         FROM asset.copy_location
6432                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
6433                 LEFT JOIN actor.usr_standing_penalty ausp 
6434                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
6435                 LEFT JOIN config.standing_penalty csp
6436                         ON (
6437                                 csp.id = ausp.standing_penalty AND 
6438                                 csp.block_list LIKE '%CAPTURE%' AND (
6439                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
6440                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
6441                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
6442                                         )
6443                                 )
6444                         )
6445                 JOIN (
6446                         SELECT COUNT(target_copy) AS copy_count, hold
6447                         FROM action.hold_copy_map
6448                         GROUP BY 2
6449                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
6450                 LEFT JOIN serial.issuance siss
6451                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
6452                 LEFT JOIN asset.copy_location_order acplo
6453                         ON (acp.location = acplo.location AND
6454                                 acp.circ_lib = acplo.org)
6455                 WHERE
6456                         ahr.capture_time IS NULL AND
6457                         ahr.cancel_time IS NULL AND
6458                         csp.id IS NULL AND
6459                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
6460                         acp.status IN (0,7)
6461                 ]]></oils_persist:source_definition>
6462                 <fields oils_persist:primary="id">
6463                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6464                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6465                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6466                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6467                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6468                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6469                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6470                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6471                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6472                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6473                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6474                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6475                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6476                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
6477                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
6478                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6479                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6480                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6481                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6482                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6483                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6484                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6485                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6486                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6487                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6488                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6489                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6490                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6491                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6492                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6493                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6494                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6495                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6496                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6497                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6498                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6499                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6500                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6501                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6502                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6503                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6504                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
6505                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
6506                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
6507                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
6508                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
6509                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
6510                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
6511                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
6512                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
6513                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
6514                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
6515                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
6516                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
6517                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
6518                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6519                 </fields>
6520                 <links>
6521                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6522                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6523                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6524                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6525                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6526                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6527                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6528                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6529                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6530                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6531                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6532                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6533                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6534                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6535                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6536                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
6537                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6538                 </links>
6539                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6540                         <actions>
6541                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6542                         </actions>
6543                 </permacrud>
6544         </class>
6545         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
6546                 <oils_persist:source_definition><![CDATA[
6547                         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)
6548                 ]]></oils_persist:source_definition>
6549                 <fields oils_persist:primary="id">
6550                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6551                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
6552                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6553                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6554                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6555                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6556                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6557                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6558                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6559                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6560                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6561                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6562                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
6563                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6564                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6565                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6566                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6567                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
6568                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6569                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6570                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6571                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
6572                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6573                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
6574                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
6575                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
6576                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6577                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
6578                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6579                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6580                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6581                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6582                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6583                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6584                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6585                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6586                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
6587                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6588                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6589                         <field reporter:label="Acquisition Request" name="acq_request" reporter:datatype="link" />
6590                 </fields>
6591                 <links>
6592                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6593                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6594                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6595                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6596                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
6597                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6598                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6599                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6600                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
6601                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
6602                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
6603                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6604                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6605                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
6606                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6607                         <link field="acq_request" reltype="has_a" key="id" map="" class="aur"/>
6608                 </links>
6609         </class>
6610
6611         <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">
6612                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
6613                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6614                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
6615                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6616                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
6617                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
6618                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
6619                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
6620                 </fields>
6621                 <links>
6622                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6623                 </links>
6624                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6625                         <actions>
6626                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
6627                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
6628                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
6629                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
6630                         </actions>
6631                 </permacrud>
6632         </class>
6633         <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">
6634                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6635                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6636                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6637                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6638                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6639                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6640                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6641                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6642                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6643                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6644                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6645                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6646                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6647                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6648                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6649                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6650                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6651                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6652                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6653                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6654                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6655                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6656                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6657                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6658                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6659                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6660                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6661                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6662                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6663                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6664                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6665                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6666                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6667                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6668                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6669                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6670                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6671                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
6672                 </fields>
6673                 <links>
6674                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6675                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6676                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6677                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6678                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6679                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6680                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6681                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6682                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6683                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6684                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6685                 </links>
6686                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6687                         <actions>
6688                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6689                         </actions>
6690                 </permacrud>
6691         </class>
6692         <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">
6693                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
6694                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
6695                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
6696                         <field reporter:label="Currently Targeted Copy" name="current_copy" reporter:datatype="link"/>
6697                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
6698                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
6699                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
6700                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
6701                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
6702                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
6703                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
6704                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
6705                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
6706                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
6707                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
6708                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
6709                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
6710                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
6711                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
6712                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
6713                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
6714                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
6715                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
6716                         <field reporter:label="Item Selection Depth" name="selection_depth" />
6717                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
6718                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
6719                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
6720                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
6721                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
6722                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
6723                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
6724                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
6725                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
6726                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
6727                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
6728                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
6729                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
6730                 </fields>
6731                 <links>
6732                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
6733                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
6734                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6735                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
6736                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6737                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
6738                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6739                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
6740                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
6741                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
6742                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
6743                 </links>
6744                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6745                         <actions>
6746                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
6747                         </actions>
6748                 </permacrud>
6749         </class>
6750
6751         <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">
6752                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
6753                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
6754                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
6755                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
6756                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
6757                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
6758                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
6759                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
6760                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link" oils_obj:required="true"/>
6761                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
6762                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
6763                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
6764                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
6765                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6766                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link" oils_obj:required="true"/>
6767                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
6768                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
6769                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6770                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
6771                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
6772                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
6773                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
6774                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6775                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
6776                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
6777                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
6778                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
6779                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6780                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6781                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6782                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6783                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6784                 </fields>
6785                 <links>
6786                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6787                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6788                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6789                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6790                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6791                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6792                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6793                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6794                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6795                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6796                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6797                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6798                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6799                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6800                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6801                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6802                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6803                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6804                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6805                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6806                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6807                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6808                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6809                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6810                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6811                 </links>
6812         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6813             <actions>
6814                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6815                 <retrieve />
6816                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6817                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6818             </actions>
6819         </permacrud>
6820         </class>
6821         <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">
6822                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6823                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6824                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6825                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6826                 </fields>
6827                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6828                         <actions>
6829                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6830                                 <retrieve/>
6831                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6832                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6833                         </actions>
6834                 </permacrud>
6835         </class>
6836         <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">
6837                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6838                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6839                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6840                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6841                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6842                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6843                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6844                 </fields>
6845                 <links>
6846                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6847                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6848                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6849                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6850                 </links>
6851                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6852                         <actions>
6853                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6854                                 <retrieve/>
6855                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6856                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6857                         </actions>
6858                 </permacrud>
6859         </class>
6860         <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">
6861                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6862                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6863                         <field name="btype" reporter:datatype="text"/>
6864                         <field name="id" reporter:datatype="id" />
6865                         <field name="name"  reporter:datatype="text"/>
6866                         <field name="description" reporter:datatype="text"/>
6867                         <field name="owner" reporter:datatype="link"/>
6868                         <field name="pub" reporter:datatype="bool"/>
6869                         <field name="create_time" reporter:datatype="timestamp" />
6870                         <field name="owning_lib" reporter:datatype="org_unit" />
6871                 </fields>
6872                 <links>
6873                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6874                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6875                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6876                 </links>
6877                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6878                         <actions>
6879                                 <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6880                                 <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6881                                 <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6882                                 <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
6883                         </actions>
6884                 </permacrud>
6885         </class>
6886         <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">
6887                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6888                         <field name="id" reporter:datatype="id" />
6889                         <field name="bucket" reporter:datatype="link"/>
6890                         <field name="note" reporter:datatype="text" />
6891                 </fields>
6892                 <links>
6893                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6894                 </links>
6895         </class>
6896         <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">
6897                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6898                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6899                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6900                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6901                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6902                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6903                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6904                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6905                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6906                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6907                 </fields>
6908                 <links>
6909                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6910                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6911                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6912                 </links>
6913                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6914                         <actions>
6915                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6916                         </actions>
6917                 </permacrud>
6918         </class>
6919         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6920                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6921                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6922                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6923                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6924                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6925                 </fields>
6926                 <links>
6927                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6928                 </links>
6929                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6930                         <actions>
6931                                 <retrieve permission="VIEW_USER user_request.view">
6932                                         <context link="usr" field="home_ou" />
6933                                 </retrieve>
6934                         </actions>
6935                 </permacrud>
6936         </class>
6937     <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">
6938         <fields oils_persist:primary="field">
6939             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6940             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6941             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6942         </fields>
6943         <links/>
6944         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6945             <actions>
6946                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6947                 <retrieve />
6948                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6949                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6950             </actions>
6951         </permacrud>
6952     </class>
6953         <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">
6954                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6955                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6956                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6957                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6958                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6959                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6960                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6961                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6962                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6963                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6964                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6965                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6966                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6967                 </fields>
6968                 <links>
6969                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6970                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6971                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6972                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6973                 </links>
6974         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6975             <actions>
6976                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6977                 <retrieve />
6978                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6979                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6980             </actions>
6981         </permacrud>
6982         </class>
6983         <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">
6984                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6985                         <field name="field" reporter:datatype="link"/>
6986                         <field name="id" reporter:datatype="id" />
6987                         <field name="source" reporter:datatype="link"/>
6988                         <field name="value"  reporter:datatype="text"/>
6989                 </fields>
6990                 <links>
6991                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6992                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6993                 </links>
6994         </class>
6995         <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">
6996                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6997                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6998                         <field name="btype" reporter:datatype="text"/>
6999                         <field name="id" reporter:datatype="id" />
7000                         <field name="name"  reporter:datatype="text"/>
7001                         <field name="description" reporter:datatype="text"/>
7002                         <field name="owner" reporter:datatype="link"/>
7003                         <field name="pub" reporter:datatype="bool"/>
7004                         <field name="create_time" reporter:datatype="timestamp" />
7005                         <field name="owning_lib" reporter:datatype="org_unit" />
7006                 </fields>
7007                 <links>
7008                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7009                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7010                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
7011                 </links>
7012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7013                         <actions>
7014                                 <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7015                                 <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7016                                 <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7017                                 <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
7018                         </actions>
7019                 </permacrud>
7020         </class>
7021         <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">
7022                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
7023                         <field name="id" reporter:datatype="id" />
7024                         <field name="bucket" reporter:datatype="link"/>
7025                         <field name="note" reporter:datatype="text" />
7026                 </fields>
7027                 <links>
7028                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7029                 </links>
7030         </class>
7031         <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">
7032                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7033                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7034                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7035                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7036                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
7037                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
7038                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7039                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7040                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
7041                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7042                 </fields>
7043                 <links>
7044                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7045                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7046                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7047                 </links>
7048         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7049             <actions>
7050                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7051                     <context link="xact" jump="usr" field="home_ou"/>
7052                 </retrieve>
7053                         </actions>
7054                 </permacrud>
7055         </class>
7056         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
7057                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
7058                         <field name="id" reporter:datatype="id" />
7059                         <field name="ind1" />
7060                         <field name="ind2" />
7061                         <field name="record" />
7062                         <field name="subfield" />
7063                         <field name="tag" />
7064                         <field name="value" />
7065                 </fields>
7066                 <links>
7067                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
7068                 </links>
7069         </class>
7070         <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">
7071                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
7072                         <field name="id" reporter:label="ID" reporter:datatype="id" />
7073                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
7074                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
7075                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
7076                 </fields>
7077                 <links>
7078                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
7079                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
7080                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
7081                 </links>
7082         </class>
7083         <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">
7084                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
7085                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
7086                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7087                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
7088                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7089                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
7090                 </fields>
7091                 <links>
7092                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7093                 </links>
7094         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7095             <actions>
7096                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7097                 <retrieve/>
7098                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7099                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
7100             </actions>
7101         </permacrud>
7102
7103         </class>
7104         <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">
7105                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
7106                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7107                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
7108                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
7109                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
7110                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7111                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
7112                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
7113                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
7114                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
7115                 </fields>
7116                 <links>
7117                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
7118                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
7119                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
7120                 </links>
7121         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7122             <actions>
7123                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
7124                 <retrieve/>
7125                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
7126                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
7127             </actions>
7128         </permacrud>
7129         </class>
7130         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
7131                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
7132                         <field name="create_date" reporter:datatype="timestamp"/>
7133                         <field name="creator" reporter:datatype="link"/>
7134                         <field name="edit_date" reporter:datatype="timestamp"/>
7135                         <field name="editor" reporter:datatype="link"/>
7136                         <field name="id" reporter:datatype="id" />
7137                         <field name="pub" reporter:datatype="bool"/>
7138                         <field name="record" reporter:datatype="link"/>
7139                         <field name="value"  reporter:datatype="text"/>
7140                 </fields>
7141                 <links>
7142                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7143                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7144                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
7145                 </links>
7146         </class>
7147         <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">
7148                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7149                         <field name="balance_owed" reporter:datatype="money" />
7150                         <field name="total_owed" reporter:datatype="money" />
7151                         <field name="total_paid" reporter:datatype="money" />
7152                         <field name="usr" reporter:datatype="link"/>
7153                 </fields>
7154                 <links>
7155                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7156                 </links>
7157         </class>
7158     <class id="mg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
7159                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7160                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
7161                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7162                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
7163                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7164                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
7165                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
7166                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7167                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7168                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
7169                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7170                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7171                 </fields>
7172                 <links>
7173                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7174                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
7175                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7176                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7177                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
7178                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7179                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7180                 </links>
7181         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7182             <actions>
7183                 <retrieve permission="VIEW_USER_TRANSACTIONS" context_field="billing_location"/>
7184             </actions>
7185         </permacrud>
7186         </class>
7187         <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">
7188                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
7189                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
7190                         <field name="quality" reporter:datatype="int" />
7191                         <field name="source" reporter:datatype="text"/>
7192                         <field name="transcendant" reporter:datatype="bool"/>
7193                         <field name="can_have_copies" reporter:datatype="bool"/>
7194                 </fields>
7195                 <links/>
7196         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7197             <actions>
7198                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
7199                 <retrieve/>
7200                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
7201                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
7202             </actions>
7203         </permacrud>
7204         </class>
7205         <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">
7206                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
7207                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
7208                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
7209                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
7210                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
7211                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
7212                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
7213                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7214                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
7215                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
7216                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
7217                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
7218                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
7219                 </fields>
7220                 <links>
7221                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
7222                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7223                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7224                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
7225                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
7226                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
7227                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
7228                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
7229                 </links>
7230                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7231                         <actions>
7232                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7233                                         <context link="usr" field="home_ou" />
7234                                 </retrieve>
7235                         </actions>
7236                 </permacrud>
7237         </class>
7238         <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">
7239                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
7240                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7241                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7242                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7243                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
7244                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7245                 </fields>
7246                 <links>
7247                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7248                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7249                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
7250                 </links>
7251         </class>
7252         <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">
7253                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
7254                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
7255                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
7256                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7257                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
7258                 </fields>
7259                 <links>
7260                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7261                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7262                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
7263                 </links>
7264         </class>
7265         <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">
7266                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
7267                         <field name="bucket" reporter:datatype="link"/>
7268                         <field name="id" reporter:datatype="id" />
7269                         <field name="target_user" reporter:datatype="link"/>
7270                         <field name="create_time" reporter:datatype="timestamp" />
7271                         <field name="pos" reporter:datatype="int" />
7272                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7273                 </fields>
7274                 <links>
7275                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
7276                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
7277             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
7278                 </links>
7279                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7280                         <actions>
7281                                 <retrieve permission="ADMIN_USER_BUCKET">
7282                     <context link="bucket" owning_lib="owning_lib"/>
7283                 </retrieve>
7284             </actions>
7285         </permacrud>
7286         </class>
7287         <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">
7288                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
7289                         <field name="id" reporter:datatype="id" />
7290                         <field name="item" reporter:datatype="link"/>
7291                         <field name="note" reporter:datatype="text" />
7292                 </fields>
7293                 <links>
7294                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
7295                 </links>
7296         </class>
7297         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
7298                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7299                         <field name="balance_owed" reporter:datatype="money" />
7300                         <field name="total_owed" reporter:datatype="money" />
7301                         <field name="total_paid" reporter:datatype="money" />
7302                         <field name="usr" reporter:datatype="link"/>
7303                 </fields>
7304                 <links>
7305                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7306                 </links>
7307         </class>
7308         <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">
7309                 <fields oils_persist:primary="code" oils_persist:sequence="">
7310                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
7311                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7312                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7313                 </fields>
7314                 <links/>
7315         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7316             <actions>
7317                 <create permission="CREATE_MARC_CODE" global_required="true"/>
7318                 <retrieve/>
7319                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
7320                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
7321             </actions>
7322         </permacrud>
7323         </class>
7324         <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">
7325                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7326                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7327                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7328                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7329                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7330                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7331                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7332                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7333                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7334                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7335                 </fields>
7336                 <links>
7337                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7338                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7339                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7340                 </links>
7341         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7342             <actions>
7343                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7344                     <context link="xact" jump="usr" field="home_ou"/>
7345                 </retrieve>
7346                         </actions>
7347                 </permacrud>
7348         </class>
7349         <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">
7350                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7351                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7352                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7353                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7354                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7355                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7356                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7357                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
7358                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7359                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7360                 </fields>
7361                 <links>
7362                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7363                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7364                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7365                 </links>
7366         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7367             <actions>
7368                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7369                     <context link="xact" jump="usr" field="home_ou"/>
7370                 </retrieve>
7371                         </actions>
7372                 </permacrud>
7373         </class>
7374         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
7375                 <fields oils_persist:primary="id" oils_persist:sequence="">
7376                         <field name="checkin_lib" reporter:datatype="link"/>
7377                         <field name="checkin_staff" reporter:datatype="link"/>
7378                         <field name="checkin_time" reporter:datatype="timestamp"/>
7379                         <field name="circ_lib"  reporter:datatype="org_unit"/>
7380                         <field name="circ_staff" reporter:datatype="link"/>
7381                         <field name="desk_renewal" reporter:datatype="bool"/>
7382                         <field name="due_date" reporter:datatype="timestamp"/>
7383                         <field name="duration" reporter:datatype="interval"/>
7384                         <field name="duration_rule" reporter:datatype="link"/>
7385                         <field name="fine_interval" reporter:datatype="interval"/>
7386                         <field name="id" reporter:datatype="id" />
7387                         <field name="max_fine" reporter:datatype="money" />
7388                         <field name="max_fine_rule" reporter:datatype="link"/>
7389                         <field name="opac_renewal" reporter:datatype="bool"/>
7390                         <field name="phone_renewal" reporter:datatype="bool"/>
7391                         <field name="recurring_fine" reporter:datatype="money" />
7392                         <field name="recurring_fine_rule" reporter:datatype="link"/>
7393                         <field name="renewal_remaining" reporter:datatype="int" />
7394             <field name="grace_period" reporter:datatype="interval" />
7395                         <field name="stop_fines" reporter:datatype="text"/>
7396                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
7397                         <field name="target_copy" reporter:datatype="link"/>
7398                         <field name="usr" reporter:datatype="link"/>
7399                         <field name="xact_finish" reporter:datatype="timestamp" />
7400                         <field name="xact_start" reporter:datatype="timestamp" />
7401                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
7402                         <field name="auto_renewal" reporter:datatype="bool"/>
7403                         <field name="auto_renewal_remaining" reporter:datatype="int" />
7404                 </fields>
7405                 <links>
7406                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
7407                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
7408                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
7409                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
7410                 </links>
7411         </class>
7412         <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">
7413                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
7414                         <field name="field" reporter:datatype="link"/>
7415                         <field name="id" reporter:datatype="id" />
7416                         <field name="source" reporter:datatype="link"/>
7417                         <field name="value" reporter:datatype="text"/>
7418                 </fields>
7419                 <links>
7420                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7421                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7422                 </links>
7423         </class>
7424         <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">
7425                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
7426                         <field name="high" reporter:datatype="money" />
7427                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
7428                         <field name="low" reporter:datatype="money" />
7429                         <field name="name" reporter:datatype="text"/>
7430                         <field name="normal" reporter:datatype="money" />
7431                         <field name="recurrence_interval" reporter:datatype="interval"/>
7432             <field name="grace_period" reporter:datatype="interval" />
7433                 </fields>
7434                 <links/>
7435         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7436             <actions>
7437                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7438                 <retrieve/>
7439                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7440                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
7441             </actions>
7442         </permacrud>
7443         </class>
7444         <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">
7445                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7446                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7447                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7448                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7449                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7450                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
7451                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7452                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7453                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7454                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7455                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7456                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7457                 </fields>
7458                 <links>
7459                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7460                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7461                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7462                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7463                 </links>
7464         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7465             <actions>
7466                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7467                     <context link="xact" jump="usr" field="home_ou"/>
7468                 </retrieve>
7469                         </actions>
7470                 </permacrud>
7471         </class>
7472         <class id="mdcp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::debit_card_payment" oils_persist:tablename="money.debit_card_payment" reporter:label="Debit Card Payment">
7473                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
7474                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
7475                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7476                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
7477                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
7478                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7479                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7480                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
7481                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
7482                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
7483                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
7484                 </fields>
7485                 <links>
7486                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
7487                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7488                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7489                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7490                 </links>
7491         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7492             <actions>
7493                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7494                     <context link="xact" jump="usr" field="home_ou"/>
7495                 </retrieve>
7496                         </actions>
7497                 </permacrud>
7498         </class>
7499         <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">
7500                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
7501                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
7502                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7503                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7504                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
7505                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="link"/>
7506                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7507                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
7508                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
7509                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
7510                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
7511                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
7512                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
7513                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
7514                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
7515                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
7516                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
7517                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
7518                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
7519                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
7520                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
7521                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7522                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
7523                         <field reporter:label="Copy ID" name="id" reporter:selector="barcode" reporter:datatype="id"/>
7524                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7525                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
7526                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
7527                         <field reporter:label="Price" name="price" reporter:datatype="money" />
7528                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
7529                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
7530                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
7531                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
7532                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7533                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
7534                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
7535                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7536                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7537                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7538                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
7539                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
7540                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
7541                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
7542                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
7543                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
7544                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
7545                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
7546                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
7547                         <field reporter:label="Latest Inventory" name="latest_inventory" oils_persist:virtual="true" reporter:datatype="link"/>
7548                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
7549                         <field reporter:label="Copy Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7550                         <field reporter:label="Copy Alerts" name="copy_alerts" oils_persist:virtual="true" reporter:datatype="link"/>
7551                 </fields>
7552                 <links>
7553                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7554                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
7555                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7556                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7557                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7558                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7559                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7560                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
7561                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
7562                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
7563                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
7564                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
7565                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
7566                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
7567                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
7568                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
7569                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7570                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
7571                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
7572                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
7573                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
7574                         <link field="latest_inventory" reltype="might_have" key="copy" map="" class="alci"/>
7575                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7576                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
7577                         <link field="tags" reltype="has_many" key="copy" map="" class="acptcm"/>
7578                         <link field="copy_alerts" reltype="has_many" key="copy" map="" class="aca"/>
7579                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7580                 </links>
7581         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7582             <actions>
7583                 <create permission="CREATE_COPY">
7584                     <context link="call_number" field="owning_lib"/>
7585                 </create>
7586                 <retrieve/>
7587                 <update permission="UPDATE_COPY">
7588                     <context link="call_number" field="owning_lib"/>
7589                 </update>
7590                 <delete permission="DELETE_COPY">
7591                     <context link="call_number" field="owning_lib"/>
7592                 </delete>
7593             </actions>
7594         </permacrud>
7595         </class>
7596
7597         <class id="alci" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::latest_inventory" oils_persist:tablename="asset.latest_inventory" reporter:core="true" reporter:label="Latest Inventory">
7598                 <fields oils_persist:primary="id" oils_persist:sequence="asset.latest_inventory_id_seq">
7599             <field reporter:label="Latest Inventory ID" name="id" reporter:datatype="id"/>
7600                         <field reporter:label="Latest Inventory Date" name="inventory_date" reporter:datatype="timestamp"/>
7601                         <field reporter:label="Latest Inventory Workstation" name="inventory_workstation" reporter:datatype="link"/>
7602                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
7603                 </fields>
7604                 <links>
7605                         <link field="inventory_workstation" reltype="has_a" key="id" map="" class="aws"/>
7606                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7607                 </links>
7608         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7609             <actions>
7610                                 <create/>
7611                                 <retrieve/>
7612                                 <update/>
7613                                 <delete/>
7614             </actions>
7615         </permacrud>
7616         </class>
7617
7618         <class id="ccat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_alert_type" oils_persist:tablename="config.copy_alert_type" reporter:label="Copy Alert Type" oils_persist:restrict_primary="100">
7619                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_alert_type_id_seq">
7620                         <field reporter:label="Id" name="id" reporter:selector="name" reporter:datatype="id"/>
7621                         <field reporter:label="Scope Org Unit" name="scope_org"  reporter:datatype="org_unit"/>
7622                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7623                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7624                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7625                         <field reporter:label="Event" name="event" reporter:datatype="text" />
7626                         <field reporter:label="During Renewal" name="in_renew" reporter:datatype="bool" />
7627                         <field reporter:label="Allow At Copy Circ Lib" name="at_circ" reporter:datatype="bool"/>
7628                         <field reporter:label="Allow At Copy Owning Lib" name="at_owning" reporter:datatype="bool"/>
7629                         <field reporter:label="Invert allowed locations" name="invert_location" reporter:datatype="bool"/>
7630                         <field reporter:label="Next Statuses" name="next_status" reporter:datatype="text"/>
7631                 </fields>
7632                 <links>
7633                         <link field="scope_org" reltype="has_a" key="id" map="" class="aou"/>
7634                 </links>
7635         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7636             <actions>
7637                 <create permission="ADMIN_COPY_ALERT_TYPE CREATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7638                 <retrieve/>
7639                 <update permission="ADMIN_COPY_ALERT_TYPE UPDATE_COPY_ALERT_TYPE" context_field="scope_org"/>
7640                 <delete permission="ADMIN_COPY_ALERT_TYPE DELETE_COPY_ALERT_TYPE" context_field="scope_org"/>
7641             </actions>
7642         </permacrud>
7643         </class>
7644
7645         <class id="acas" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::copy_alert_suppress" oils_persist:tablename="actor.copy_alert_suppress" reporter:label="Copy Alert Suppression">
7646                 <fields oils_persist:primary="id" oils_persist:sequence="actor.copy_alert_suppress_id_seq">
7647                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7648                         <field reporter:label="Org Unit" name="org"  reporter:datatype="org_unit"/>
7649                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7650                 </fields>
7651                 <links>
7652                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7653                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7654                 </links>
7655         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7656             <actions>
7657                 <create permission="ADMIN_COPY_ALERT_SUPPRESS CREATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7658                 <retrieve/>
7659                 <update permission="ADMIN_COPY_ALERT_SUPPRESS UPDATE_COPY_ALERT_SUPPRESS" context_field="org"/>
7660                 <delete permission="ADMIN_COPY_ALERT_SUPPRESS DELETE_COPY_ALERT_SUPPRESS" context_field="org"/>
7661             </actions>
7662         </permacrud>
7663         </class>
7664
7665         <class id="aca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_alert" oils_persist:tablename="asset.copy_alert" reporter:label="Copy Alert">
7666                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_alert_id_seq">
7667                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7668                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7669                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7670                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7671                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7672                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7673                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7674                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7675                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7676                 </fields>
7677                 <links>
7678                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7679                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7680                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7681                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7682                 </links>
7683         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7684             <actions>
7685                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
7686                     <context link="copy" field="circ_lib"/>
7687                 </create>
7688                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
7689                     <context link="copy" field="circ_lib"/>
7690                                 </retrieve>
7691                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
7692                     <context link="copy" field="circ_lib"/>
7693                                 </update>
7694                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
7695                     <context link="copy" field="circ_lib"/>
7696                                 </delete>
7697             </actions>
7698         </permacrud>
7699         </class>
7700
7701         <class id="aaca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::active_copy_alert" oils_persist:tablename="asset.active_copy_alert" reporter:label="Active Copy Alert" oils_persist:readonly="true">
7702                 <fields oils_persist:primary="id">
7703                         <field reporter:label="Id" name="id" reporter:datatype="id"/>
7704                         <field reporter:label="Alert Type" name="alert_type" reporter:datatype="link" />
7705                         <field reporter:label="Copy" name="copy"  reporter:datatype="link"/>
7706                         <field reporter:label="Temporary" name="temp" reporter:datatype="bool" />
7707                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp" />
7708                         <field reporter:label="Creator" name="create_staff" reporter:datatype="link"/>
7709                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7710                         <field reporter:label="Acknowledge Date/Time" name="ack_time" reporter:datatype="timestamp" />
7711                         <field reporter:label="Acknowledger" name="ack_staff" reporter:datatype="link"/>
7712                 </fields>
7713                 <links>
7714                         <link field="alert_type" reltype="has_a" key="id" map="" class="ccat"/>
7715                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
7716                         <link field="create_staff" reltype="has_a" key="id" map="" class="au"/>
7717                         <link field="ack_staff" reltype="has_a" key="id" map="" class="au"/>
7718                 </links>
7719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7720             <actions>
7721                 <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT">
7722                     <context link="copy" field="circ_lib"/>
7723                 </create>
7724                 <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT">
7725                     <context link="copy" field="circ_lib"/>
7726                                 </retrieve>
7727                 <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT">
7728                     <context link="copy" field="circ_lib"/>
7729                                 </update>
7730                 <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT">
7731                     <context link="copy" field="circ_lib"/>
7732                                 </delete>
7733             </actions>
7734         </permacrud>
7735         </class>
7736
7737         <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">
7738                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
7739                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
7740                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="org_unit"/>
7741                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7742                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7743                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
7744                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
7745                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7746                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="org_unit"/>
7747                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
7748                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7749                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
7750                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
7751                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="link"/>
7752                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
7753                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
7754                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
7755                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
7756                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
7757                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
7758                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
7759                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="link"/>
7760                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
7761                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
7762                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
7763                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
7764                 </fields>
7765                 <links>
7766                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7767                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7768                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7769                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7770                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
7771                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7772                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7773                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
7774                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
7775                         <link field="circ_as_type" reltype="has_a" key="code" map="" class="citm"/>
7776                 </links>
7777                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7778                         <actions>
7779                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7780                                 <retrieve />
7781                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7782                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
7783                         </actions>
7784                 </permacrud>
7785         </class>
7786
7787         <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">
7788                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
7789                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
7790                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7791                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7792                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
7793                 </fields>
7794                 <links/>
7795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7796             <actions>
7797                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7798                 <retrieve/>
7799                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7800                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
7801             </actions>
7802         </permacrud>
7803         </class>
7804         <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">
7805                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
7806                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
7807                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7808                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
7809                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
7810                 </fields>
7811                 <links/>
7812         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7813             <actions>
7814                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7815                 <retrieve/>
7816                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7817                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
7818             </actions>
7819         </permacrud>
7820         </class>
7821         <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">
7822                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
7823                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7824                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7825                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7826                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7827                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7828                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
7829                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
7830                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
7831                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
7832                 </fields>
7833                 <links>
7834                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
7835                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
7836                 </links>
7837         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7838             <actions>
7839                 <create permission="CREATE_PERM" global_required="true"/>
7840                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7841                 <update permission="UPDATE_PERM" global_required="true"/>
7842                 <delete permission="DELETE_PERM" global_required="true"/>
7843             </actions>
7844         </permacrud>
7845         </class>
7846         <class id="pgtde" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_tree_display_entry" oils_persist:tablename="permission.grp_tree_display_entry" reporter:label="Permission Group Tree Display Entry">
7847                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_display_entry_id_seq">
7848                         <field reporter:label="Entry ID" name="id" reporter:selector="name" reporter:datatype="id"/>
7849                         <field reporter:label="Group ID" name="grp" reporter:datatype="link" oils_persist:i18n="true"/>
7850                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
7851                         <field reporter:label="Org Unit" name="org" reporter:datatype="link"/>
7852                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7853                         <field reporter:label="Child Entries" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7854                 </fields>
7855                 <links>
7856                         <link field="parent" reltype="has_a" key="id" map="" class="pgtde"/>
7857                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7858                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7859                         <link field="children" reltype="has_many" key="parent" map="" class="pgtde"/>
7860                 </links>
7861                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7862                         <actions>
7863                                 <create permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7864                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7865                                 <update permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7866                                 <delete permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
7867                         </actions>
7868                 </permacrud>
7869         </class>
7870         <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">
7871                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
7872                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
7873                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
7874                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
7875                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
7876                 </fields>
7877                 <links>
7878                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
7879                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
7880                 </links>
7881         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7882             <actions>
7883                 <create permission="ADMIN_SURVEY">
7884                     <context link="question" jump="survey" field="owner"/>
7885                 </create>
7886                 <retrieve/>
7887                 <update permission="ADMIN_SURVEY">
7888                     <context link="question" jump="survey" field="owner"/>
7889                 </update>
7890                 <delete permission="ADMIN_SURVEY">
7891                     <context link="question" jump="survey" field="owner"/>
7892                 </delete>
7893             </actions>
7894         </permacrud>
7895         </class>
7896         <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">
7897                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
7898                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
7899                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
7900                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
7901                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
7902                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
7903                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
7904                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
7905                 </fields>
7906                 <links>
7907                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
7908                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
7909                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
7910                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7911                 </links>
7912                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7913                         <actions>
7914                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
7915                         </actions>
7916                 </permacrud>
7917         </class>
7918         <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">
7919                 <fields oils_persist:primary="usr" oils_persist:sequence="">
7920                         <field name="balance_owed" reporter:datatype="money" />
7921                         <field name="total_owed" reporter:datatype="money" />
7922                         <field name="total_paid" reporter:datatype="money" />
7923                         <field name="usr" reporter:datatype="link"/>
7924                 </fields>
7925                 <links>
7926                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7927                 </links>
7928         </class>
7929         <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">
7930                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
7931                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
7932                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
7933                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
7934                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
7935                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7936                 </fields>
7937                 <links>
7938                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7939                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
7940                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7941                 </links>
7942         </class>
7943         <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">
7944                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
7945                         <field name="field" reporter:datatype="link"/>
7946                         <field name="id" reporter:datatype="id" />
7947                         <field name="source" reporter:datatype="link"/>
7948                         <field name="value" reporter:datatype="text"/>
7949                 </fields>
7950                 <links>
7951                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7952                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7953                 </links>
7954         </class>
7955         <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">
7956                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
7957                         <field name="field" reporter:datatype="link"/>
7958                         <field name="id" reporter:datatype="id" />
7959                         <field name="source" reporter:datatype="link"/>
7960                         <field name="value" reporter:datatype="text"/>
7961                 </fields>
7962                 <links>
7963                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
7964                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
7965                 </links>
7966         </class>
7967         <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">
7968                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
7969                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
7970                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
7971                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
7972                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
7973                 </fields>
7974                 <links>
7975                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
7976                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
7977                 </links>
7978         </class>
7979         <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">
7980                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
7981                         <field name="depth" reporter:datatype="int" />
7982                         <field name="grantable" reporter:datatype="bool"/>
7983                         <field name="grp" reporter:datatype="link"/>
7984                         <field name="id" reporter:datatype="id" />
7985                         <field name="perm" reporter:datatype="link"/>
7986                 </fields>
7987                 <links>
7988                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7989                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7990                 </links>
7991         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7992             <actions>
7993                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
7994                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
7995                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
7996                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
7997             </actions>
7998         </permacrud>
7999         </class>
8000         <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">
8001                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
8002                         <field name="items" oils_persist:virtual="true" />
8003                         <field name="btype" reporter:datatype="text"/>
8004                         <field name="id" reporter:datatype="id" />
8005                         <field name="name" reporter:datatype="text"/>
8006                         <field name="description" reporter:datatype="text"/>
8007                         <field name="owner" reporter:datatype="link"/>
8008                         <field name="pub" reporter:datatype="bool"/>
8009                         <field name="create_time" reporter:datatype="timestamp" />
8010                         <field name="owning_lib" reporter:datatype="org_unit" />
8011                 </fields>
8012                 <links>
8013                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8014                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8015                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
8016                 </links>
8017                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8018                         <actions>
8019                                 <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8020                                 <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8021                                 <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8022                                 <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
8023                         </actions>
8024                 </permacrud>
8025         </class>
8026         <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">
8027                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
8028                         <field name="id" reporter:datatype="id" />
8029                         <field name="bucket" reporter:datatype="link"/>
8030                         <field name="note" reporter:datatype="text" />
8031                 </fields>
8032                 <links>
8033                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
8034                 </links>
8035         </class>
8036         <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">
8037                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
8038                         <field reporter:label="User/Working Location Map ID" name="id" reporter:datatype="int" />
8039                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
8040                         <field reporter:label="Working Location" name="work_ou" reporter:datatype="link"/>
8041                 </fields>
8042                 <links>
8043                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8044                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
8045                 </links>
8046         </class>
8047         <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">
8048                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
8049                         <field name="depth" reporter:datatype="int"/>
8050                         <field name="grantable" reporter:datatype="bool"/>
8051                         <field name="id" reporter:datatype="id" />
8052                         <field name="perm" reporter:datatype="link"/>
8053                         <field name="usr" reporter:datatype="link"/>
8054                 </fields>
8055                 <links>
8056                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8057                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8058                 </links>
8059         </class>
8060         <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">
8061                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
8062                         <field name="object_id" reporter:datatype="text"/>
8063                         <field name="grantable" reporter:datatype="bool"/>
8064                         <field name="id" reporter:datatype="id" />
8065                         <field name="perm" reporter:datatype="link"/>
8066                         <field name="usr" reporter:datatype="link"/>
8067                         <field name="object_type" reporter:datatype="text"/>
8068                 </fields>
8069                 <links>
8070                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8071                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
8072                 </links>
8073         </class>
8074         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:label="Payments">
8075                 <fields oils_persist:primary="id" oils_persist:sequence="">
8076                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8077                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8078                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8079                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8080                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8081                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8082                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8083                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8084                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8085                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8086                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8087                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8088                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8089                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8090                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8091                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8092                 </fields>
8093                 <links>
8094                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8095                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8096                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8097                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8098                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8099                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8100                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8101                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8102                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8103                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8104                 </links>
8105         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8106             <actions>
8107                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8108                     <context link="xact" jump="usr" field="home_ou"/>
8109                 </retrieve>
8110                         </actions>
8111                 </permacrud>
8112         </class>
8113         <class id="map" controller="open-ils.cstore open-ils.pcrud" 
8114                 oils_obj:fieldmapper="money::aged_payment" 
8115                 oils_persist:tablename="money.aged_payment" 
8116                 reporter:label="Payments: Aged">
8117                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8118                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8119                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8120                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8121                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8122                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8123                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8124                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8125                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8126                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8127                         <field name="billing" reporter:datatype="link"/>
8128                 </fields>
8129                 <links>
8130                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8131                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8132                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8133                         <link field="billing" reltype="has_a" key="id" class="mab"/>
8134                 </links>
8135                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8136                         <actions>
8137                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8138                                         <context link="xact" field="usr_home_ou"/>
8139                                 </retrieve>
8140                         </actions>
8141                 </permacrud>
8142         </class>
8143         <class id="mallp" controller="open-ils.cstore" 
8144                 oils_obj:fieldmapper="money::all_payments" 
8145                 oils_persist:tablename="money.all_payments" 
8146                 oils_persist="readonly" reporter:core="true"
8147                 reporter:label="Payments: All">
8148                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
8149                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8150                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8151                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8152                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8153                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8154                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8155                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8156                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8157                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8158                         <field name="billing" reporter:datatype="link"/>
8159                 </fields>
8160                 <links>
8161                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8162                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8163                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8164                         <link field="billing" reltype="has_a" key="id" class="mallb"/>
8165                 </links>
8166         </class>
8167
8168         <class id="mbp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
8169                 <fields oils_persist:primary="id" oils_persist:sequence="">
8170                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8171                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8172                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8173                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8174                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8175                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8176                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8177                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8178                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8179                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8180                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8181                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8182                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8183                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8184                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8185                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8186                         <field reporter:label="Debit Card Payment Detail" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8187                 </fields>
8188                 <links>
8189                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8190                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8191                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8192                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8193                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8194                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8195                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8196                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8197                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8198                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8199                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8200                 </links>
8201                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8202                         <actions>
8203                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8204                                         <context link="xact" jump="usr" field="home_ou"/>
8205                                 </retrieve>
8206                         </actions>
8207                 </permacrud>
8208         </class>
8209         <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">
8210                 <fields oils_persist:primary="id" oils_persist:sequence="">
8211                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8212                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8213                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8214                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8215                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8216                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8217                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8218                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8219                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8220                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8221                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8222                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
8223                 </fields>
8224                 <links>
8225                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
8226                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
8227                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
8228                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
8229                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
8230                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8231                 </links>
8232         </class>
8233         <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">
8234                 <fields oils_persist:primary="id" oils_persist:sequence="">
8235                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8236                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
8237                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8238                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
8239                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
8240                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
8241                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
8242                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
8243                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8244                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8245                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8246                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8247                         <field reporter:label="Debit Card Payment" name="debit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
8248                 </fields>
8249                 <links>
8250                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
8251                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
8252                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
8253                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8254                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
8255                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
8256                         <link field="debit_card_payment" reltype="might_have" key="id" map="" class="mdcp"/>
8257                 </links>
8258         </class>
8259         <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">
8260                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
8261                         <field name="bucket" reporter:datatype="link"/>
8262                         <field name="id" reporter:datatype="id" />
8263                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
8264                         <field name="create_time" reporter:datatype="timestamp" />
8265                         <field name="pos" reporter:datatype="int" />
8266                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8267                 </fields>
8268                 <links>
8269                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
8270                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
8271             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
8272                 </links>
8273                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8274                         <actions>
8275                                 <retrieve permission="ADMIN_COPY_BUCKET">
8276                     <context link="bucket" owning_lib="owning_lib"/>
8277                 </retrieve>
8278             </actions>
8279         </permacrud>
8280         </class>
8281         <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">
8282                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
8283                         <field name="id" reporter:datatype="id" />
8284                         <field name="item" reporter:datatype="link"/>
8285                         <field name="note" reporter:datatype="text" />
8286                 </fields>
8287                 <links>
8288                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
8289                 </links>
8290         </class>
8291         <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">
8292                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
8293                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
8294                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8295                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
8296                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
8297                 </fields>
8298                 <links>
8299                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
8300                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8301                 </links>
8302                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8303                         <actions>
8304                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
8305                         </actions>
8306                 </permacrud>
8307         </class>
8308     <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">
8309         <fields oils_persist:primary="field">
8310             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
8311             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
8312             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
8313         </fields>
8314         <links/>
8315         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8316             <actions>
8317                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
8318                 <retrieve />
8319                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
8320                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
8321             </actions>
8322         </permacrud>
8323     </class>
8324         <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">
8325                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
8326                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
8327                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8328                 </fields>
8329                 <links/>
8330         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8331             <actions>
8332                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8333                 <retrieve/>
8334                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8335                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
8336             </actions>
8337         </permacrud>
8338         </class>
8339
8340
8341         <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">
8342                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8343                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8344                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8345                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8346                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
8347                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8348                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8349                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8350                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8351                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8352                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8353                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8354                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8355                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8356                 </fields>
8357                 <links>
8358                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8359                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
8360                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8361                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8362                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8363                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8364                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
8365                 </links>
8366         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8367             <actions>
8368                 <create permission="TRANSIT_COPY">
8369                     <context link="target_copy" field="owner"/>
8370                 </create>
8371                 <retrieve/>
8372                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8373                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8374             </actions>
8375         </permacrud>
8376         </class>
8377         <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">
8378                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
8379                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
8380                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
8381                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
8382                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
8383                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
8384                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
8385                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
8386                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
8387                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
8388                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
8389                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
8390                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
8391                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
8392                 </fields>
8393                 <links>
8394                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
8395                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
8396                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
8397                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
8398                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
8399                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
8400                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8401                 </links>
8402         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8403             <actions>
8404                 <create permission="TRANSIT_COPY" context_field="owner">
8405                     <context link="target_copy" field="circ_lib"/>
8406                 </create>
8407                 <retrieve/>
8408                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
8409                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
8410             </actions>
8411         </permacrud>
8412         </class>
8413         <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">
8414                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8415                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8416                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8417                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8418                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8419                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8420                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8421                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8422                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8423                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8424                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8425                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8426                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8427                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8428                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
8429                 </fields>
8430                 <links>
8431                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8432                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8433                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8434                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
8435                 </links>
8436         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8437             <actions>
8438                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8439                     <context link="xact" jump="usr" field="home_ou"/>
8440                 </retrieve>
8441                         </actions>
8442                 </permacrud>
8443         </class>
8444         <class id="mab" controller="open-ils.cstore open-ils.pcrud" 
8445                 oils_obj:fieldmapper="money::aged_billing" 
8446                 oils_persist:tablename="money.aged_billing" 
8447                 reporter:label="Aged Billing Line Item">
8448                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
8449                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8450                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8451                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8452                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8453                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8454                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8455                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8456                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8457                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8458                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8459                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8460                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8461                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8462                 </fields>
8463                 <links>
8464                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8465                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8466                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8467                 </links>
8468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8469                         <actions>
8470                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
8471                                         <context link="xact" field="usr_home_ou"/>
8472                                 </retrieve>
8473                         </actions>
8474                 </permacrud>
8475         </class>
8476         <class id="mallb" controller="open-ils.cstore" 
8477                 oils_obj:fieldmapper="money::all_billings" 
8478                 oils_persist:tablename="money.all_billings" 
8479                 oils_persist="readonly" reporter:label="All Billing Line Items">
8480                 <fields oils_persist:primary="id" oils_persist:sequence="">
8481                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8482                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
8483                         <field reporter:label="Billing Period Start" name="period_start" reporter:datatype="timestamp"/>
8484                         <field reporter:label="Billing Period End" name="period_end" reporter:datatype="timestamp"/>
8485                         <field reporter:label="Legacy Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
8486                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
8487                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
8488                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8489                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
8490                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
8491                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
8492                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
8493                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
8494                 </fields>
8495                 <links>
8496                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
8497                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
8498                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
8499                 </links>
8500         </class>
8501         <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">
8502                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
8503                         <field name="grp" />
8504                         <field name="id" reporter:datatype="id" />
8505                         <field name="usr" />
8506                 </fields>
8507                 <links>
8508                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
8509                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8510                 </links>
8511         </class>
8512         <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">
8513                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
8514                         <field name="id" reporter:datatype="id" />
8515                         <field name="fq_field" reporter:datatype="text"/>
8516                         <field name="identity_value" reporter:datatype="text"/>
8517                         <field name="translation" reporter:datatype="text"/>
8518                         <field name="string" reporter:datatype="text"/>
8519                 </fields>
8520                 <links>
8521                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
8522                 </links>
8523         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8524             <actions>
8525                 <create permission="CREATE_TRANSLATION" global_required="true"/>
8526                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
8527                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
8528                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
8529             </actions>
8530         </permacrud>
8531         </class>
8532         <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">
8533                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
8534                         <field name="id" reporter:datatype="id" />
8535                         <field name="fm_class" reporter:datatype="text"/>
8536                         <field name="field" reporter:datatype="text"/>
8537                         <field name="owner" reporter:datatype="org_unit"/>
8538                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
8539                 </fields>
8540                 <links>
8541                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8542                 </links>
8543         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8544             <actions>
8545                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8546                 <retrieve/>
8547                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8548                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
8549             </actions>
8550         </permacrud>
8551         </class>
8552         <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">
8553                 <fields oils_persist:primary="code">
8554                         <field name="code" reporter:datatype="id" />
8555                         <field name="marc_code" reporter:datatype="text"/>
8556                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
8557                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8558                         <field name="rtl" reporter:datatype="bool"/>
8559                 </fields>
8560                 <links/>
8561         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8562             <actions>
8563                 <create permission="CREATE_LOCALE" global_required="true"/>
8564                 <retrieve/>
8565                 <update permission="UPDATE_LOCALE" global_required="true"/>
8566                 <delete permission="DELETE_LOCALE" global_required="true"/>
8567             </actions>
8568         </permacrud>
8569         </class>
8570         <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">
8571                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
8572                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name" oils_obj:required="true"/>
8573                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true" oils_obj:required="true"/>
8574                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" oils_obj:required="true"/>
8575                         <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
8576                 </fields>
8577                 <links>
8578                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8579                 </links>
8580         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8581             <actions>
8582                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
8583                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
8584                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
8585                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
8586             </actions>
8587         </permacrud>
8588         </class>
8589
8590         <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">
8591                 <fields oils_persist:primary="id">
8592                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8593                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8594                 </fields>
8595                 <links/>
8596         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8597             <actions>
8598                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8599                 <retrieve/>
8600                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8601                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
8602             </actions>
8603         </permacrud>
8604         </class>
8605
8606         <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">
8607                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
8608                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8609                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8610                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8611                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8612                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8613                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8614                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8615                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8616                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8617                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8618                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8619                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8620                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8621                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8622                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
8623                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8624                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8625                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8626                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8627                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8628                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8629                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8630                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8631                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8632                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8633                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8634                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
8635                 </fields>
8636                 <links>
8637                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8638                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8639                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8640                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8641                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8642                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8643                 </links>
8644         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8645             <actions>
8646                 <create permission="user_request.create">
8647                     <context link="usr" field="home_ou"/>
8648                                 </create>
8649                 <retrieve permission="user_request.view">
8650                     <context link="usr" field="home_ou"/>
8651                                 </retrieve>
8652                 <update permission="user_request.update">
8653                     <context link="usr" field="home_ou"/>
8654                                 </update>
8655                 <delete permission="user_request.delete">
8656                     <context link="usr" field="home_ou"/>
8657                                 </delete>
8658             </actions>
8659         </permacrud>
8660         </class>
8661
8662         <class id="aurs" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_status" reporter:label="User Purchase Request with Status" oils_persist="readonly">
8663         <oils_persist:source_definition><![CDATA[
8664             SELECT r.*, CASE
8665                         WHEN r.cancel_reason IS NOT NULL THEN 7 -- Canceled
8666                         WHEN h.fulfillment_time IS NOT NULL THEN 6 -- Fulfilled
8667                         WHEN l.state = 'received' THEN 5 -- Received
8668                         WHEN p.state = 'on-order' AND h.id IS NOT NULL THEN 4 -- Ordered, Hold Placed
8669                         WHEN p.state = 'on-order' AND h.id IS NULL THEN 3 -- Ordered, Hold Not Placed
8670                         WHEN l.id IS NOT NULL THEN 2 -- Pending
8671                         WHEN l.id IS NULL THEN 1 -- New
8672                         ELSE 0 -- Error
8673                     END AS request_status
8674                     ,u.home_ou
8675             FROM      acq.user_request r
8676             JOIN actor.usr u ON (r.usr = u.id)
8677             LEFT JOIN acq.lineitem l ON (r.lineitem = l.id)
8678             LEFT JOIN acq.purchase_order p ON (l.purchase_order = p.id)
8679             LEFT JOIN action.hold_request h ON (h.acq_request = r.id)
8680         ]]></oils_persist:source_definition>
8681                 <fields oils_persist:primary="id">
8682                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8683                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8684                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
8685                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
8686                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
8687                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
8688                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
8689                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
8690                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8691                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
8692                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
8693                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
8694                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
8695                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
8696                         <field reporter:label="UPC" name="upc" reporter:datatype="text" />
8697                         <field reporter:label="Title" name="title" reporter:datatype="text" />
8698                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
8699                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8700                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
8701                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
8702                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
8703                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
8704                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
8705                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
8706                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
8707                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8708                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp" />
8709                         <field reporter:label="Request Status" name="request_status" reporter:datatype="link" />
8710                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="link"/>
8711                 </fields>
8712                 <links>
8713                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8714                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8715                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8716                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
8717                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
8718                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8719                         <link field="request_status" reltype="has_a" key="id" map="" class="aurst"/>
8720                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
8721                 </links>
8722         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8723             <actions>
8724                 <retrieve permission="user_request.view">
8725                     <context link="usr" field="home_ou"/>
8726                                 </retrieve>
8727             </actions>
8728         </permacrud>
8729         </class>
8730
8731         <class id="aurst" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_status_type" oils_persist:tablename="acq.user_request_status_type" reporter:label="Acquisition Patron Request Status Type">
8732                 <fields oils_persist:primary="id">
8733                         <field reporter:label="Status ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8734                         <field reporter:label="Status" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8735                 </fields>
8736                 <links/>
8737         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8738             <actions>
8739                 <retrieve/>
8740             </actions>
8741         </permacrud>
8742         </class>
8743
8744         <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">
8745                 <fields oils_persist:primary="code">
8746                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
8747                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
8748                 </fields>
8749                 <links/>
8750         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8751             <actions>
8752                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8753                 <retrieve/>
8754                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8755                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8756             </actions>
8757         </permacrud>
8758         </class>
8759
8760         <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">
8761                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
8762                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
8763                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
8764                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
8765                         <field reporter:label="Ratio" name="ratio" />
8766                 </fields>
8767                 <links>
8768                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
8769                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
8770                 </links>
8771                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8772                         <actions>
8773                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8774                                 <retrieve/>
8775                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8776                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
8777                         </actions>
8778                 </permacrud>
8779         </class>
8780
8781         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
8782                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
8783                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8784                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8785                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
8786                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
8787                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8788                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
8789                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
8790                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
8791                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
8792                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8793                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8794                         <field reporter:label="URL" name="url" reporter:datatype="text" />
8795                         <field reporter:label="Email" name="email" reporter:datatype="text" />
8796                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
8797                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
8798                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
8799                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
8800                         <field reporter:label="Notes" name="provider_notes" oils_persist:virtual="true" reporter:datatype="link" />
8801                 </fields>
8802                 <links>
8803                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8804                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8805             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
8806             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
8807                         <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
8808                         <link field="provider_notes" reltype="has_many" map="" key="provider" class="acqpron"/>
8809                 </links>
8810         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8811             <actions>
8812                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
8813                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
8814                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
8815                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
8816             </actions>
8817         </permacrud>
8818         </class>
8819
8820         <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">
8821                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
8822                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8823                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8824                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8825                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8826                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8827                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8828                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8829                 </fields>
8830                 <links>
8831                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8832                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8833                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8834                 </links>
8835         </class>
8836
8837         <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">
8838                 <fields oils_persist:primary="code">
8839                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
8840                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8841                 </fields>
8842                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8843             <actions>
8844                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8845                 <retrieve/>
8846                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8847                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
8848             </actions>
8849                 </permacrud>
8850         </class>
8851
8852         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
8853                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
8854                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
8855                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
8856                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8857                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
8858                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
8859                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
8860                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
8861                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
8862                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
8863                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
8864                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8865                         <field reporter:label="Close Date" name="close_date" reporter:datatype="timestamp" />
8866                         <field reporter:label="Closed By" name="closed_by" reporter:datatype="link" />
8867                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
8868                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
8869                 </fields>
8870                 <links>
8871                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
8872                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8873                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
8874                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
8875                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
8876                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
8877                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
8878                         <link field="closed_by" reltype="has_a" key="id" map="" class="au"/>
8879                 </links>
8880         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8881             <actions>
8882                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
8883                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
8884                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
8885                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
8886             </actions>
8887         </permacrud>
8888         </class>
8889
8890         <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">
8891                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
8892                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8893                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8894                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8895                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
8896                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
8897                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
8898                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8899                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
8900                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8901                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8902                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8903                 </fields>
8904                 <links>
8905                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8906                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8907                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8908                 </links>
8909         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8910             <actions>
8911                 <create   permission="ADMIN_INVOICE">
8912                                         <context link="invoice" field="receiver"/>
8913                                 </create>
8914                 <retrieve permission="ADMIN_INVOICE">
8915                                         <context link="invoice" field="receiver"/>
8916                                 </retrieve>
8917                 <update   permission="ADMIN_INVOICE">
8918                                         <context link="invoice" field="receiver"/>
8919                                 </update>
8920                                 <delete   permission="ADMIN_INVOICE">
8921                                         <context link="invoice" field="receiver"/>
8922                                 </delete>
8923             </actions>
8924         </permacrud>
8925         </class>
8926
8927         <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">
8928                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
8929                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8930                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
8931                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8932                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8933                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
8934                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
8935                         <field reporter:label="Author" name="author" reporter:datatype="text" />
8936                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8937                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
8938                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
8939                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8940                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
8941                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
8942                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8943                 </fields>
8944                 <links>
8945                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
8946                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8947                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8948                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8949                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8950                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
8951                 </links>
8952         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8953             <actions>
8954                 <create   permission="ADMIN_INVOICE">
8955                                         <context link="invoice" field="receiver"/>
8956                                 </create>
8957                 <retrieve permission="ADMIN_INVOICE">
8958                                         <context link="invoice" field="receiver"/>
8959                                 </retrieve>
8960                 <update   permission="ADMIN_INVOICE">
8961                                         <context link="invoice" field="receiver"/>
8962                                 </update>
8963                                 <delete   permission="ADMIN_INVOICE">
8964                                         <context link="invoice" field="receiver"/>
8965                                 </delete>
8966             </actions>
8967         </permacrud>
8968         </class>
8969
8970         <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">
8971                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
8972                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
8973                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
8974                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
8975                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
8976                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8977                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8978                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
8979                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
8980                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
8981                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
8982                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
8983                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
8984                 </fields>
8985                 <links>
8986                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8987                 </links>
8988         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8989             <actions>
8990                 <create permission="ADMIN_PROVIDER">
8991                     <context link="provider" field="owner"/>
8992                 </create>
8993                 <retrieve permission="ADMIN_PROVIDER">
8994                     <context link="provider" field="owner"/>
8995                 </retrieve>
8996                 <update permission="ADMIN_PROVIDER">
8997                     <context link="provider" field="owner"/>
8998                 </update>
8999                 <delete permission="ADMIN_PROVIDER">
9000                     <context link="provider" field="owner"/>
9001                 </delete>
9002             </actions>
9003         </permacrud>
9004         </class>
9005
9006         <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">
9007                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
9008                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9009                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9010                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9011                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
9012                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
9013                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
9014         </fields>
9015                 <links>
9016                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9017                 </links>
9018         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9019             <actions>
9020                 <create permission="ADMIN_PROVIDER">
9021                     <context link="provider" field="owner"/>
9022                 </create>
9023                 <retrieve permission="ADMIN_PROVIDER">
9024                     <context link="provider" field="owner"/>
9025                 </retrieve>
9026                 <update permission="ADMIN_PROVIDER">
9027                     <context link="provider" field="owner"/>
9028                 </update>
9029                 <delete permission="ADMIN_PROVIDER">
9030                     <context link="provider" field="owner"/>
9031                 </delete>
9032             </actions>
9033         </permacrud>
9034     </class>
9035         <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">
9036                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
9037                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
9038                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
9039                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
9040                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
9041                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
9042                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9043                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
9044                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
9045                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
9046                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
9047                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
9048                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
9049                 </fields>
9050                 <links>
9051                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
9052                 </links>
9053         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9054             <actions>
9055                 <create permission="ADMIN_PROVIDER">
9056                     <context link="contact" jump='provider' field="owner"/>
9057                 </create>
9058                 <retrieve permission="ADMIN_PROVIDER">
9059                     <context link="contact" jump='provider' field="owner"/>
9060                 </retrieve>
9061                 <update permission="ADMIN_PROVIDER">
9062                     <context link="contact" jump='provider' field="owner"/>
9063                 </update>
9064                 <delete permission="ADMIN_PROVIDER">
9065                     <context link="contact" jump='provider' field="owner"/>
9066                 </delete>
9067             </actions>
9068         </permacrud>
9069         </class>
9070
9071         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
9072                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
9073                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
9074                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
9075                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
9076                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
9077                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
9078                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
9079                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
9080                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9081                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
9082                 </fields>
9083                 <links>
9084                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
9085                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
9086                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
9087                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9088                 </links>
9089         </class>
9090
9091         <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">
9092                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
9093                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9094                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
9095                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
9096                 </fields>
9097                 <links>
9098             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
9099                 </links>
9100                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9101                         <actions>
9102                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9103                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9104                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9105                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9106                         </actions>
9107                 </permacrud>
9108         </class>
9109
9110         <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">
9111                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
9112                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
9113                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
9114                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
9115                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
9116                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
9117                 </fields>
9118                 <links>
9119                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
9120                 </links>
9121                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9122                         <actions>
9123                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9124                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
9125                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9126                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
9127                         </actions>
9128                 </permacrud>
9129         </class>
9130
9131         <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">
9132                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
9133                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9134                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9135                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
9136                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
9137                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9138                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9139                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9140                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
9141                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
9142                 </fields>
9143                 <links>
9144                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9145                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9146             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
9147             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
9148                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
9149                 </links>
9150         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9151             <actions>
9152                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9153                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
9154                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9155                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
9156             </actions>
9157         </permacrud>
9158         </class>
9159
9160         <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">
9161                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
9162                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
9163                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
9164                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9165                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9166                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
9167                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
9168                 </fields>
9169                 <links>
9170                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9171                 </links>
9172                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9173                         <actions>
9174                                 <create permission="ADMIN_FUNDING_SOURCE">
9175                     <context link="funding_source" field="owner"/>
9176                 </create>
9177                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
9178                     <context link="funding_source" field="owner"/>
9179                 </retrieve>
9180                                 <update permission="ADMIN_FUNDING_SOURCE">
9181                     <context link="funding_source" field="owner"/>
9182                 </update>
9183                                 <delete permission="ADMIN_FUNDING_SOURCE">
9184                     <context link="funding_source" field="owner"/>
9185                 </delete>
9186                         </actions>
9187                 </permacrud>
9188         </class>
9189
9190         <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">
9191                 <fields oils_persist:primary="id">
9192                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
9193                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
9194                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
9195                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
9196                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
9197                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9198                 </fields>
9199                 <links>
9200                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9201                 </links>
9202         </class>
9203
9204         <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">
9205                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
9206                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
9207                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9208                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
9209                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
9210                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9211                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
9212                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
9213                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9214                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
9215                 </fields>
9216                 <links>
9217                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9218                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9219                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
9220                 </links>
9221                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9222                         <actions>
9223                                 <create permission="ADMIN_ACQ_FUND">
9224                     <context link="fund" field="org"/>
9225                 </create>
9226                                 <retrieve permission="ADMIN_ACQ_FUND">
9227                     <context link="fund" field="org"/>
9228                 </retrieve>
9229                                 <update permission="ADMIN_ACQ_FUND">
9230                     <context link="fund" field="org"/>
9231                 </update>
9232                                 <delete permission="ADMIN_ACQ_FUND">
9233                     <context link="fund" field="org"/>
9234                 </delete>
9235                         </actions>
9236                 </permacrud>
9237         </class>
9238
9239         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
9240                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9241                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9242                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9243                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9244                         <field reporter:label="Year" name="year" reporter:datatype="int" />
9245                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9246                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9247                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9248                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9249                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
9250                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9251                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9252                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
9253                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
9254                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
9255                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
9256                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
9257                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
9258                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
9259                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
9260                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9261                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
9262                 </fields>
9263                 <links>
9264                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9265                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9266             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
9267             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
9268             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
9269             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
9270             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
9271             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
9272             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
9273             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
9274             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
9275                 </links>
9276         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
9277             <actions>
9278                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
9279                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9280                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
9281                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
9282             </actions>
9283         </permacrud>
9284         </class>
9285
9286         <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">
9287                 <fields oils_persist:primary="fund">
9288                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9289                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9290                 </fields>
9291                 <links>
9292                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9293                 </links>
9294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9295             <actions>
9296                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9297                                         <context link="fund" field="org" />
9298                 </retrieve>
9299             </actions>
9300         </permacrud>
9301         </class>
9302
9303         <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">
9304                 <fields oils_persist:primary="fund">
9305                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9306                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
9307                 </fields>
9308                 <links>
9309                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9310                 </links>
9311         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9312             <actions>
9313                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9314                                         <context link="fund" field="org" />
9315                 </retrieve>
9316             </actions>
9317         </permacrud>
9318         </class>
9319
9320         <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">
9321                 <fields oils_persist:primary="fund">
9322                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9323                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
9324                 </fields>
9325                 <links>
9326                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9327                 </links>
9328         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9329             <actions>
9330                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9331                                         <context link="fund" field="org" />
9332                 </retrieve>
9333             </actions>
9334         </permacrud>
9335         </class>
9336
9337         <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">
9338                 <fields oils_persist:primary="fund">
9339                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9340                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9341                 </fields>
9342                 <links>
9343                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9344                 </links>
9345         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9346             <actions>
9347                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9348                                         <context link="fund" field="org" />
9349                 </retrieve>
9350             </actions>
9351         </permacrud>
9352         </class>
9353
9354         <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">
9355                 <fields oils_persist:primary="fund">
9356                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9357                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
9358                 </fields>
9359                 <links>
9360                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9361                 </links>
9362         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9363             <actions>
9364                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9365                                         <context link="fund" field="org" />
9366                 </retrieve>
9367             </actions>
9368         </permacrud>
9369         </class>
9370
9371    <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">
9372         <fields oils_persist:primary="fund">
9373             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9374             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
9375         </fields>
9376         <links>
9377             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9378         </links>
9379     </class>
9380
9381    <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">
9382         <fields oils_persist:primary="fund">
9383             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9384             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
9385         </fields>
9386         <links>
9387             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9388         </links>
9389     </class>
9390
9391    <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">
9392         <fields oils_persist:primary="fund">
9393             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9394             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
9395         </fields>
9396         <links>
9397             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9398         </links>
9399     </class>
9400
9401    <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">
9402         <fields oils_persist:primary="fund">
9403             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9404             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
9405         </fields>
9406         <links>
9407             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9408         </links>
9409     </class>
9410
9411    <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">
9412         <fields oils_persist:primary="fund">
9413             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9414             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
9415         </fields>
9416         <links>
9417             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9418         </links>
9419     </class>
9420
9421         <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">
9422                 <fields oils_persist:primary="funding_source">
9423                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9424                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
9425                 </fields>
9426                 <links>
9427                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9428                 </links>
9429         </class>
9430
9431         <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">
9432                 <fields oils_persist:primary="funding_source">
9433                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9434                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
9435                 </fields>
9436                 <links>
9437                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9438                 </links>
9439         </class>
9440
9441         <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">
9442                 <fields oils_persist:primary="funding_source">
9443                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9444                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
9445                 </fields>
9446                 <links>
9447                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9448                 </links>
9449         </class>
9450
9451         <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">
9452                 <fields oils_persist:primary="fund">
9453                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
9454                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
9455                 </fields>
9456                 <links>
9457                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9458                 </links>
9459         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9460             <actions>
9461                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9462                                         <context link="fund" field="org" />
9463                 </retrieve>
9464             </actions>
9465         </permacrud>
9466     </class>
9467     <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">
9468         <oils_persist:source_definition><![CDATA[
9469             SELECT
9470                 acqf.*,
9471                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
9472                 COALESCE(acqfst.amount, 0.00) AS spent_total,
9473                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
9474                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
9475             FROM
9476                 acq.fund acqf
9477                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
9478                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
9479                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
9480                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
9481         ]]></oils_persist:source_definition>
9482         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
9483             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
9484             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9485             <field reporter:label="Name" name="name" reporter:datatype="text" />
9486             <field reporter:label="Year" name="year" reporter:datatype="int" />
9487             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
9488             <field reporter:label="Code" name="code" reporter:datatype="text" />
9489             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
9490             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
9491             <field reporter:label="Active" name="active" reporter:datatype="bool" />
9492             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
9493             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
9494
9495             <!-- non fund-native fields -->
9496             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
9497             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
9498             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
9499             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
9500         </fields>
9501         <links>
9502             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
9503             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9504             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
9505         </links>
9506         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9507             <actions>
9508                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
9509             </actions>
9510         </permacrud>
9511         </class>
9512         <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">
9513                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
9514                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9515                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9516                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9517                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
9518                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9519                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9520                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9521                 </fields>
9522                 <links>
9523                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9524                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9525                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9526                 </links>
9527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9528                         <actions>
9529                                 <create permission="ADMIN_ACQ_FUND">
9530                     <context link="fund" field="org"/>
9531                 </create>
9532                                 <retrieve permission="ADMIN_ACQ_FUND">
9533                     <context link="fund" field="org"/>
9534                 </retrieve>
9535                                 <update permission="ADMIN_ACQ_FUND">
9536                     <context link="fund" field="org"/>
9537                 </update>
9538                                 <delete permission="ADMIN_ACQ_FUND">
9539                     <context link="fund" field="org"/>
9540                 </delete>
9541                         </actions>
9542                 </permacrud>
9543         </class>
9544
9545     <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">
9546         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
9547             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
9548             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
9549             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
9550             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
9551             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
9552             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
9553             <field reporter:label="Note" name="note" reporter:datatype="text" />
9554             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
9555         </fields>
9556         <links>
9557             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
9558             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9559             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
9560         </links>
9561                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9562                         <actions>
9563                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9564                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9565                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9566                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
9567                         </actions>
9568                 </permacrud>
9569     </class>
9570
9571         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
9572                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
9573                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
9574                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9575                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
9576                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
9577                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9578                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9579                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
9580                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
9581                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9582                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9583                 </fields>
9584                 <links>
9585                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9586                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9587                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9588                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9589                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
9590                 </links>
9591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9592                         <actions>
9593                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
9594                         </actions>
9595                 </permacrud>
9596         </class>
9597
9598         <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">
9599                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
9600                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
9601                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
9602                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9603                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
9604                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
9605                 </fields>
9606                 <links>
9607                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9608                 </links>
9609                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9610                         <actions>
9611                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9612                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
9613                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9614                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
9615                         </actions>
9616                 </permacrud>
9617         </class>
9618
9619         <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">
9620                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
9621                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
9622                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
9623                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9624                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9625                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9626                         <field reporter:label="State" name="state" reporter:datatype="text" />
9627                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
9628                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9629                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9630                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
9631                         <field reporter:label="Name" name="name" reporter:datatype="text" />
9632                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9633                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9634                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
9635                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
9636                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
9637                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
9638                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
9639                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
9640                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
9641                 </fields>
9642                 <links>
9643                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9644                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9645                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9646                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
9647                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9648                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
9649                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
9650                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
9651                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9652                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9653                 </links>
9654                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9655                         <actions>
9656                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9657                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9658                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9659                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
9660                         </actions>
9661                 </permacrud>
9662         </class>
9663
9664         <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">
9665                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
9666                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9667                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9668                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9669                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
9670                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9671                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9672                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9673                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
9674                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9675                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9676                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9677                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9678                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
9679                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9680                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9681                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
9682                 </fields>
9683                 <links>
9684                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
9685                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9686                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9687                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9688                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
9689                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9690                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9691                 </links>
9692                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9693             <actions>
9694                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
9695             </actions>
9696                 </permacrud>
9697         </class>
9698
9699         <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">
9700                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
9701                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
9702                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9703                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9704                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9705                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9706                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9707                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
9708                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9709                 </fields>
9710                 <links>
9711                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9712                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9713                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9714                 </links>
9715                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9716             <actions>
9717                 <create permission="CREATE_PURCHASE_ORDER">
9718                     <context link="purchase_order" field="ordering_agency"/>
9719                 </create>
9720                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9721                     <context link="purchase_order" field="ordering_agency"/>
9722                 </retrieve>
9723                 <update permission="CREATE_PURCHASE_ORDER">
9724                     <context link="purchase_order" field="ordering_agency"/>
9725                 </update>
9726                 <delete permission="CREATE_PURCHASE_ORDER">
9727                     <context link="purchase_order" field="ordering_agency"/>
9728                 </delete>
9729             </actions>
9730                 </permacrud>
9731         </class>
9732
9733         <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">
9734                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
9735                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9736                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9737                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9738                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
9739                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
9740                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
9741                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9742                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
9743                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9744                         <field reporter:label="Target" name="target" reporter:datatype="int" />
9745                 </fields>
9746                 <links>
9747                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9748                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9749                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
9750                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9751                 </links>
9752                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9753             <actions>
9754                 <create permission="CREATE_PURCHASE_ORDER">
9755                     <context link="purchase_order" field="ordering_agency"/>
9756                 </create>
9757                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9758                     <context link="purchase_order" field="ordering_agency"/>
9759                 </retrieve>
9760                 <update permission="CREATE_PURCHASE_ORDER">
9761                     <context link="purchase_order" field="ordering_agency"/>
9762                 </update>
9763                 <delete permission="CREATE_PURCHASE_ORDER">
9764                     <context link="purchase_order" field="ordering_agency"/>
9765                 </delete>
9766             </actions>
9767                 </permacrud>
9768         </class>
9769
9770         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
9771                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
9772                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
9773                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
9774                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
9775                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
9776                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
9777                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9778                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9779                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
9780                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
9781                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
9782                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
9783                         <field reporter:label="State" name="state" reporter:datatype="text" />
9784                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9785                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9786                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
9787                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9788                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9789                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9790                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
9791                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
9792                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
9793                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
9794                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
9795                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
9796                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
9797                 </fields>
9798                 <links>
9799                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9800                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9801                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9802                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9803                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9804                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9805                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9806                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
9807                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
9808                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
9809                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9810                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
9811                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9812                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
9813                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
9814                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9815                 </links>
9816                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9817                         <actions>
9818                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
9819                                         <context link="purchase_order" field="ordering_agency"/>
9820                                         <context link="picklist" field="org_unit"/>
9821                                 </retrieve>
9822                         </actions>
9823                 </permacrud>
9824         </class>
9825
9826         <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">
9827                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
9828                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
9829                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
9830                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
9831                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
9832                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9833                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
9834                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
9835                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
9836                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
9837                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
9838                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
9839                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9840                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
9841                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
9842                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
9843                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
9844                         <field reporter:label="State" name="state" reporter:datatype="text"/>
9845                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
9846                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
9847                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
9848                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
9849                 </fields>
9850                 <links>
9851                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
9852                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9853                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9854                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
9855                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
9856                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
9857                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
9858                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
9859                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9860                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9861                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
9862                 </links>
9863                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9864                         <actions>
9865                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
9866                                         <context link="purchase_order" field="ordering_agency"/>
9867                                         <context link="picklist" field="org_unit"/>
9868                                 </retrieve>
9869                         </actions>
9870                 </permacrud>
9871         </class>
9872
9873         <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">
9874                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
9875                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
9876                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9877                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9878                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9879                 </fields>
9880                 <links>
9881                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9882                 </links>
9883                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9884                         <actions>
9885                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9886                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
9887                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9888                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
9889                         </actions>
9890                 </permacrud>
9891         </class>
9892
9893         <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">
9894                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
9895                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
9896                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
9897                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
9898                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
9899                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
9900                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
9901                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
9902                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
9903                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
9904                 </fields>
9905                 <links>
9906                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9907                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
9908                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9909                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
9910                 </links>
9911         </class>
9912
9913         <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">
9914                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
9915                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
9916                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
9917                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
9918                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
9919                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
9920                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
9921                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
9922                 </fields>
9923                 <links>
9924                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9925                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
9926                 </links>
9927         </class>
9928
9929         <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">
9930                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
9931                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
9932                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
9933                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
9934                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
9935                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
9936                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
9937                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
9938                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
9939                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
9940                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9941                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
9942                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
9943                         <field reporter:label="Note" name="note" reporter:datatype="text" />
9944                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
9945                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
9946                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
9947                 </fields>
9948                 <links>
9949                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9950                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
9951                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9952                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9953                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9954                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9955                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9956                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
9957                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
9958                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
9959                 </links>
9960         </class>
9961
9962         <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">
9963                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9964                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9965                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9966                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9967                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9968                 </fields>
9969                 <links/>
9970                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9971                         <actions>
9972                                 <retrieve />
9973                         </actions>
9974                 </permacrud>
9975         </class>
9976
9977         <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">
9978                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9979                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
9980                         <field reporter:label="Code" name="code" reporter:datatype="text" />
9981                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
9982                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
9983                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
9984             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
9985                 </fields>
9986                 <links/>
9987         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9988             <actions>
9989                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9990                 <retrieve />
9991                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9992                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
9993             </actions>
9994         </permacrud>
9995         </class>
9996
9997         <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">
9998                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
9999                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10000                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10001                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10002                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
10003                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10004                 </fields>
10005                 <links/>
10006         </class>
10007         <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">
10008                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10009                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10010                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10011                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10012                         <field reporter:label="User" name="usr" reporter:datatype="link" />
10013                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10014                 </fields>
10015                 <links>
10016                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10017                 </links>
10018         </class>
10019
10020         <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">
10021             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10022                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10023                 <field reporter:label="Code" name="code" reporter:datatype="text" />
10024                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10025                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
10026                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10027                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10028         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
10029
10030             </fields>
10031             <links>
10032                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10033             </links>
10034             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10035                 <actions>
10036                     <create permission="ADMIN_PROVIDER">
10037                         <context link="provider" field="owner"/>
10038                     </create>
10039                     <retrieve permission="ADMIN_PROVIDER">
10040                         <context link="provider" field="owner"/>
10041                     </retrieve>
10042                     <update permission="ADMIN_PROVIDER">
10043                         <context link="provider" field="owner"/>
10044                     </update>
10045                     <delete permission="ADMIN_PROVIDER">
10046                         <context link="provider" field="owner"/>
10047                     </delete>
10048                 </actions>
10049             </permacrud>
10050         </class>
10051         
10052         <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">
10053             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
10054                 <field reporter:label="ID" name="id" reporter:datatype="id" />
10055                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
10056                 <field reporter:label="Name" name="name" reporter:datatype="text" />
10057                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
10058             </fields>
10059             <links>
10060                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10061             </links>
10062             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10063                 <actions>
10064                     <create permission="ADMIN_PROVIDER">
10065                         <context link="provider" field="owner"/>
10066                     </create>
10067                     <retrieve permission="ADMIN_PROVIDER">
10068                         <context link="provider" field="owner"/>
10069                     </retrieve>
10070                     <update permission="ADMIN_PROVIDER">
10071                         <context link="provider" field="owner"/>
10072                     </update>
10073                     <delete permission="ADMIN_PROVIDER">
10074                         <context link="provider" field="owner"/>
10075                     </delete>
10076                 </actions>
10077             </permacrud>
10078         </class>
10079         
10080         <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">
10081             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
10082                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
10083                         <field reporter:label="Code" name="code" reporter:datatype="text" />
10084                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
10085                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
10086                 </fields>
10087                 <links/>
10088         </class>
10089
10090         <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">
10091                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
10092                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
10093                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
10094                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
10095                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
10096                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
10097                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
10098                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
10099                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
10100                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
10101                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
10102                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
10103                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
10104                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
10105                         <field name="attr_set"      reporter:datatype="link"      reporter:label="EDI Attribute Set"/>
10106                         <field name="use_attrs"     reporter:datatype="bool"      reporter:label="Use EDI Attributes"/>
10107                 </fields>
10108                 <links>
10109                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
10110                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10111                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10112                 </links>
10113         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10114             <actions>
10115                 <create permission="ADMIN_PROVIDER">
10116                     <context link="provider" field="owner"/>
10117                 </create>
10118                 <retrieve permission="ADMIN_PROVIDER">
10119                     <context link="provider" field="owner"/>
10120                 </retrieve>
10121                 <update permission="ADMIN_PROVIDER">
10122                     <context link="provider" field="owner"/>
10123                 </update>
10124                 <delete permission="ADMIN_PROVIDER">
10125                     <context link="provider" field="owner"/>
10126                 </delete>
10127             </actions>
10128         </permacrud>
10129         </class>
10130
10131         <class id="aea" controller="open-ils.cstore open-ils.pcrud" 
10132                 oils_obj:fieldmapper="acq::edi_attr" 
10133                 oils_persist:tablename="acq.edi_attr" reporter:label="EDI Attribute">
10134                 <fields oils_persist:primary="key">
10135                         <field name="key"   reporter:datatype="text" reporter:label="Key" reporter:selector="label"/>
10136                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10137                 </fields>
10138         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10139             <actions>
10140                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10141                 <retrieve/>
10142                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10143                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10144             </actions>
10145         </permacrud>
10146         </class>
10147         <class id="aeas" controller="open-ils.cstore open-ils.pcrud" 
10148                 oils_obj:fieldmapper="acq::edi_attr_set" 
10149                 oils_persist:tablename="acq.edi_attr_set" reporter:label="EDI Attribute Set">
10150                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_id_seq">
10151                         <field name="id"    reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10152                         <field name="label" reporter:datatype="text" reporter:label="Label"/>
10153                         <field name="attr_maps" reporter:datatype="link" oils_persist:virtual="true" reporter:label="Mapped EDI Attributes"/>
10154                 </fields>
10155                 <links>
10156                         <link field="attr_maps" reltype="has_many" key="attr_set" map="" class="aeasm"/>
10157                 </links>
10158         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10159             <actions>
10160                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10161                 <retrieve/>
10162                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10163                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10164             </actions>
10165         </permacrud>
10166         </class>
10167         <class id="aeasm" controller="open-ils.cstore open-ils.pcrud" 
10168                 oils_obj:fieldmapper="acq::edi_attr_set_map" 
10169                 oils_persist:tablename="acq.edi_attr_set_map" reporter:label="EDI Attribute Set Map">
10170                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_attr_set_map_id_seq">
10171                         <field name="id"       reporter:datatype="id"   reporter:label="ID" reporter:selector="label"/>
10172                         <field name="attr_set" reporter:datatype="link" reporter:label="Attribute Set"/>
10173                         <field name="attr"     reporter:datatype="link" reporter:label="Attribute"/>
10174                 </fields>
10175                 <links>
10176                         <link field="attr_set" reltype="has_a" key="id" map="" class="aeas"/>
10177                         <link field="attr" reltype="has_a" key="id" map="" class="aea"/>
10178                 </links>
10179         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10180             <actions>
10181                 <create permission="ADMIN_PROVIDER" global_required="true"/>
10182                 <retrieve/>
10183                 <update permission="ADMIN_PROVIDER" global_required="true"/>
10184                 <delete permission="ADMIN_PROVIDER" global_required="true"/>
10185             </actions>
10186         </permacrud>
10187         </class>
10188
10189
10190         <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">
10191                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
10192                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
10193                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
10194                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
10195                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
10196                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
10197                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
10198                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
10199                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
10200                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
10201                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
10202                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
10203                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
10204                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
10205                 </fields>
10206                 <links>
10207                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
10208                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10209                 </links>
10210         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10211             <actions>
10212                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10213                     <context link="account" jump="provider" field="owner"/>
10214                 </retrieve>
10215                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10216                     <context link="account" jump="provider" field="owner"/>
10217                 </update>
10218                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
10219                     <context link="account" jump="provider" field="owner"/>
10220                 </delete>
10221             </actions>
10222         </permacrud>
10223         </class>
10224
10225
10226         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
10227                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
10228                         <field name="id" reporter:datatype="id" />
10229                         <field name="parent" reporter:datatype="link"/>
10230                         <field name="owner" reporter:datatype="link"/>
10231                         <field name="create_time" reporter:datatype="timestamp"/>
10232                         <field name="name" reporter:datatype="text"/>
10233                         <field name="shared" reporter:datatype="bool"/>
10234                         <field name="share_with" reporter:datatype="link"/>
10235                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10236                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
10237                 </fields>
10238                 <links>
10239                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10240                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
10241                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
10242                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10243                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
10244                 </links>
10245         </class>
10246         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
10247                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
10248                         <field name="id" reporter:datatype="id" />
10249                         <field name="parent" reporter:datatype="link"/>
10250                         <field name="owner" reporter:datatype="link"/>
10251                         <field name="create_time" reporter:datatype="timestamp"/>
10252                         <field name="name" reporter:datatype="text"/>
10253                         <field name="shared" reporter:datatype="bool"/>
10254                         <field name="share_with" reporter:datatype="link"/>
10255                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10256                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
10257                 </fields>
10258                 <links>
10259                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10260                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
10261                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
10262                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10263                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
10264                 </links>
10265         </class>
10266         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
10267                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
10268                         <field name="id" reporter:datatype="id" />
10269                         <field name="parent" reporter:datatype="link"/>
10270                         <field name="owner" reporter:datatype="link"/>
10271                         <field name="create_time" reporter:datatype="timestamp"/>
10272                         <field name="name" reporter:datatype="text"/>
10273                         <field name="shared" reporter:datatype="bool"/>
10274                         <field name="share_with" reporter:datatype="link"/>
10275                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
10276                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10277                 </fields>
10278                 <links>
10279                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10280                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
10281                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
10282                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
10283                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
10284                 </links>
10285         </class>
10286         <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">
10287                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
10288                         <field name="id" reporter:datatype="id" />
10289                         <field name="owner" reporter:datatype="link"/>
10290                         <field name="create_time" reporter:datatype="timestamp"/>
10291                         <field name="name" reporter:datatype="text"/>
10292                         <field name="data" reporter:datatype="text"/>
10293                         <field name="folder" reporter:datatype="link"/>
10294                         <field name="description" reporter:datatype="text"/>
10295                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
10296                 </fields>
10297                 <links>
10298                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10299                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
10300                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
10301                 </links>
10302         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10303             <actions>
10304                 <create   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10305                 <retrieve permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10306                 <update   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10307                 <delete   permission="RUN_REPORTS" owning_user="owner" global_required="true"/>
10308             </actions>
10309         </permacrud>
10310         </class>
10311         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
10312                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
10313                         <field name="id" reporter:datatype="id" />
10314                         <field name="owner" reporter:datatype="link"/>
10315                         <field name="create_time" reporter:datatype="timestamp"/>
10316                         <field name="template" reporter:datatype="link"/>
10317                         <field name="data" reporter:datatype="text"/>
10318                         <field name="folder" reporter:datatype="link"/>
10319                         <field name="recur" reporter:datatype="bool"/>
10320                         <field name="recurrence" reporter:datatype="interval"/>
10321                         <field name="name" reporter:datatype="text"/>
10322                         <field name="description" reporter:datatype="text"/>
10323                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
10324                 </fields>
10325                 <links>
10326                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10327                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
10328                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
10329                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
10330                 </links>
10331         </class>
10332         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
10333                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
10334                         <field name="id" reporter:datatype="id" />
10335                         <field name="runner" reporter:datatype="link"/>
10336                         <field name="start_time" reporter:datatype="timestamp"/>
10337                         <field name="complete_time" reporter:datatype="timestamp"/>
10338                         <field name="run_time" reporter:datatype="timestamp"/>
10339                         <field name="email" reporter:datatype="text"/>
10340                         <field name="excel_format" reporter:datatype="bool"/>
10341                         <field name="csv_format" reporter:datatype="bool"/>
10342                         <field name="html_format" reporter:datatype="bool"/>
10343                         <field name="error_code" reporter:datatype="int"/>
10344                         <field name="error_text" reporter:datatype="text"/>
10345                         <field name="report" reporter:datatype="link"/>
10346                         <field name="folder" reporter:datatype="link"/>
10347                         <field name="chart_pie" reporter:datatype="bool"/>
10348                         <field name="chart_bar" reporter:datatype="bool"/>
10349                         <field name="chart_line" reporter:datatype="bool"/>
10350                 </fields>
10351                 <links>
10352                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
10353                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
10354                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
10355                 </links>
10356         </class>
10357         <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">
10358                 <fields oils_persist:primary="id">
10359                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10360                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10361                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10362                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10363                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10364                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10365                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10366                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10367                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10368                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10369                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10370                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10371                 </fields>
10372                 <links>
10373                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10374                 </links>
10375                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10376                         <actions>
10377                                 <retrieve />
10378                         </actions>
10379                 </permacrud>
10380         </class>
10381         <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">
10382                 <fields oils_persist:primary="id">
10383                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10384                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
10385                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10386                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10387                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10388                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10389                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10390                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10391                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10392                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10393                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10394                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10395                 </fields>
10396                 <links>
10397                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10398                 </links>
10399         </class>
10400         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
10401                 <fields oils_persist:primary="id">
10402                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
10403                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
10404                         <field reporter:label="Fingerprint" name="fingerprint" />
10405                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
10406                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
10407                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
10408                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
10409                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
10410                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
10411                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
10412                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
10413                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
10414                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
10415                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
10416                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
10417                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
10418                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
10419                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
10420                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
10421                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
10422                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
10423                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
10424                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
10425                 </fields>
10426                 <links>
10427                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
10428                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
10429                 </links>
10430         </class>
10431         <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">
10432                 <fields oils_persist:primary="id">
10433                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
10434                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
10435                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
10436                 </fields>
10437                 <links>
10438                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
10439                 </links>
10440         </class>
10441         <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">
10442                 <fields oils_persist:primary="id">
10443                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
10444                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
10445                 </fields>
10446                 <links>
10447                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
10448                 </links>
10449         </class>
10450         <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">
10451                 <fields oils_persist:primary="id">
10452                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
10453                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
10454                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
10455                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
10456                 </fields>
10457                 <links>
10458                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
10459                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
10460                 </links>
10461         </class>
10462         <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">
10463                 <fields oils_persist:primary="xact">
10464                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10465                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="money" />
10466                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
10467                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
10468                 </fields>
10469                 <links>
10470                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10471                 </links>
10472         </class>
10473         <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">
10474                 <fields oils_persist:primary="xact">
10475                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
10476                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="money" />
10477                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
10478                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
10479                 </fields>
10480                 <links>
10481                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
10482                 </links>
10483         </class>
10484         <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)">
10485                 <fields oils_persist:primary="id">
10486                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
10487                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
10488                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
10489                 </fields>
10490                 <links>
10491                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10492                 </links>
10493         </class>
10494         <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">
10495                 <fields oils_persist:primary="id">
10496                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
10497                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
10498                 </fields>
10499                 <links>
10500                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10501                 </links>
10502         </class>
10503         <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">
10504                 <fields oils_persist:primary="bibid">
10505                         <field reporter:label="Bib Record" name="bibid" reporter:datatype="id" />
10506                         <field reporter:label="Circulation Library" name="circ_lib" reporter:datatype="link" />
10507                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link" />
10508                         <field reporter:label="Last Edit Date" name="last_edit_time" reporter:datatype="timestamp" />
10509                         <field reporter:label="Has Only Deleted Copies 0/1" name="has_only_deleted_copies" reporter:datatype="int" />
10510                         <field reporter:label="Total deleted copies" name="deleted_count" reporter:datatype="int" />
10511                         <field reporter:label="Total visible copies" name="visible_count" reporter:datatype="int" />
10512                         <field reporter:label="Total copies attached" name="total_count" reporter:datatype="int" />
10513                 </fields>
10514                 <links>
10515                         <link field="bibid" reltype="has_a" key="id" map="" class="bre"/>
10516                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10517                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10518                 </links>
10519         </class>
10520         <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">
10521                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
10522                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
10523                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
10524                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
10525                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
10526                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
10527                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
10528                 </fields>
10529                 <links>
10530                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10531                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
10532                 </links>
10533                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10534                         <actions>
10535                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10536                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10537                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10538                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
10539                         </actions>
10540                 </permacrud>
10541         </class>
10542         <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">
10543                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
10544                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
10545                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
10546                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
10547                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10548                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10549                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
10550                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
10551                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
10552                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
10553                 </fields>
10554                 <links>
10555                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10556                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10557                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
10558                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10559                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
10560                 </links>
10561                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10562                         <actions>
10563                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
10564                                         <context link="formula" field="owner"/>
10565                                 </create>
10566                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
10567                                         <context link="formula" field="owner"/>
10568                                 </retrieve>
10569                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
10570                                         <context link="formula" field="owner"/>
10571                                 </update>
10572                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
10573                                         <context link="formula" field="owner"/>
10574                                 </delete>
10575                         </actions>
10576                 </permacrud>
10577         </class>
10578
10579         <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">
10580                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
10581                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10582                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10583                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10584                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
10585                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10586                 </fields>
10587                 <links>
10588                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10589                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
10590                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10591                 </links>
10592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10593                         <actions>
10594                                 <create permission="CREATE_PURCHASE_ORDER">
10595                                         <context link="formula" field="owner"/>
10596                 </create>
10597                                 <retrieve permission="CREATE_PURCHASE_ORDER">
10598                                         <context link="formula" field="owner"/>
10599                 </retrieve>
10600                                 <update permission="CREATE_PURCHASE_ORDER">
10601                                         <context link="formula" field="owner"/>
10602                 </update>
10603                                 <delete permission="CREATE_PURCHASE_ORDER">
10604                                         <context link="formula" field="owner"/>
10605                 </delete>
10606                         </actions>
10607                 </permacrud>
10608         </class>
10609
10610         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
10611                 <fields oils_persist:primary="id">
10612                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
10613                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
10614                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
10615                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
10616                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
10617                 </fields>
10618                 <links>
10619                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
10620                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
10621                 </links>
10622         </class>
10623
10624         <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">
10625                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
10626                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10627                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10628                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10629                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10630                 </fields>
10631                 <links>
10632                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10633                 </links>
10634                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10635                         <actions>
10636                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10637                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10638                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10639                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
10640                         </actions>
10641                 </permacrud>
10642         </class>
10643
10644         <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">
10645                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
10646                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
10647                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10648                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
10649                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10650                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
10651                 </fields>
10652                 <links>
10653                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10654                 </links>
10655                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10656                         <actions>
10657                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10658                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
10659                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10660                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
10661                         </actions>
10662                 </permacrud>
10663         </class>
10664
10665         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
10666                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
10667                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10668                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10669                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10670                 </fields>
10671                 <links>
10672                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10673                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10674                 </links>
10675         </class>
10676
10677         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
10678                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
10679                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10680                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10681                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10682                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10683                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10684                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10685                 </fields>
10686                 <links>
10687                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10688                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
10689                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10690                 </links>
10691         </class>
10692
10693         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
10694                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
10695                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
10696                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
10697                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
10698                 </fields>
10699                 <links>
10700                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
10701                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
10702                 </links>
10703         </class>
10704
10705         <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">
10706                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
10707                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
10708                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
10709                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
10710                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
10711                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10712                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
10713                 </fields>
10714                 <links>
10715                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
10716                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
10717                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10718                 </links>
10719         </class>
10720
10721         <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">
10722                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
10723                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
10724                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
10725                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
10726                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
10727                 </fields>
10728                 <links>
10729                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10730                 </links>
10731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10732             <actions>
10733                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10734                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
10735                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10736                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
10737             </actions>
10738                 </permacrud>
10739         </class>
10740
10741         <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">
10742                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
10743                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
10744                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
10745                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
10746                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
10747                 </fields>
10748                 <links>
10749                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
10750                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
10751                 </links>
10752                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10753                         <actions>
10754                                 <create permission="ADMIN_CLAIM_POLICY">
10755                                         <context link="claim_policy" field="org_unit"/>
10756                 </create>
10757                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
10758                                         <context link="claim_policy" field="org_unit"/>
10759                 </retrieve>
10760                                 <update permission="ADMIN_CLAIM_POLICY">
10761                                         <context link="claim_policy" field="org_unit"/>
10762                 </update>
10763                                 <delete permission="ADMIN_CLAIM_POLICY">
10764                                         <context link="claim_policy" field="org_unit"/>
10765                 </delete>
10766                         </actions>
10767                 </permacrud>
10768         </class>
10769
10770     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
10771         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
10772             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10773             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
10774             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10775             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
10776             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
10777             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
10778             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
10779             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
10780             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
10781             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
10782             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
10783             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
10784             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
10785             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
10786             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10787             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
10788                                                 <field reporter:label="Preferred First Name" name="pref_first_given_name" reporter:datatype="text"/>
10789                                                 <field reporter:label="Preferred Middle Name" name="pref_second_given_name" reporter:datatype="text"/>
10790                                                 <field reporter:label="Preferred Last Name" name="pref_family_name"  reporter:datatype="text"/>
10791         </fields>
10792         <links>
10793             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
10794             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10795         </links>
10796     </class>
10797
10798     <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">
10799         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
10800             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10801             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10802             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10803             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10804             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10805         </fields>
10806     </class>
10807
10808     <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">
10809         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10810             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10811             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10812             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10813             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10814             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10815             <field reporter:label="City" name="city" reporter:datatype="text"/>
10816             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10817             <field reporter:label="State" name="state" reporter:datatype="text"/>
10818             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10819             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10820             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10821         </fields>
10822     </class>
10823
10824     <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">
10825         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
10826             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10827             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10828             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10829             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
10830             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
10831             <field reporter:label="City" name="city" reporter:datatype="text"/>
10832             <field reporter:label="County" name="county"  reporter:datatype="text"/>
10833             <field reporter:label="State" name="state" reporter:datatype="text"/>
10834             <field reporter:label="Country" name="country" reporter:datatype="text"/>
10835             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
10836             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10837         </fields>
10838     </class>
10839
10840     <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">
10841         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
10842             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10843             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10844             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10845             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
10846             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
10847             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10848         </fields>
10849     </class>
10850
10851     <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">
10852         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.setting_stage_row_id_seq">
10853             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
10854             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
10855             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
10856             <field reporter:label="User Setting Code" name="setting" reporter:datatype="text"/>
10857             <field reporter:label="User Setting Value" name="value" reporter:datatype="text"/>
10858             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
10859         </fields>
10860     </class>
10861
10862         <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">
10863                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_group_id_seq">
10864                         <field reporter:label="Fieldset Group ID" name="id" reporter:datatype="id"/>
10865                         <field reporter:label="Fieldset Group Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10866                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp"/>
10867                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
10868                         <field reporter:label="Container ID" name="container" reporter:datatype="int" oils_obj:required="true"/> <!-- not an fkey because could be on multiple tables -->
10869                         <field reporter:label="Container Type" name="container_type" reporter:datatype="text" oils_obj:required="true"/>
10870                         <field reporter:label="Rollback Group" name="rollback_group" reporter:datatype="link"/>
10871                         <field reporter:label="Rollback Time" name="rollback_time" reporter:datatype="timestamp"/>
10872                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10873                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10874                 </fields>
10875                 <links>
10876                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10877                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10878                         <link field="rollback_group" reltype="has_a" key="id" map="" class="afsg"/>
10879                 </links>
10880                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10881                         <actions>
10882                                 <create permission="CREATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10883                                 <retrieve permission="RETRIEVE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10884                                 <update permission="UPDATE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10885                                 <delete permission="DELETE_FIELDSET_GROUP ADMIN_FIELDSET_GROUP" context_field="owning_lib" owning_user="creator"/>
10886                         </actions>
10887                 </permacrud>
10888         </class>
10889
10890         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
10891                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
10892                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
10893                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
10894                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
10895                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
10896                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
10897                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
10898                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
10899                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
10900                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
10901                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
10902                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
10903                         <field reporter:label="Fieldset Group" name="fieldset_group" reporter:datatype="link"/>
10904                         <field reporter:label="Error Message" name="error_msg" reporter:datatype="text"/>
10905                 </fields>
10906                 <links>
10907                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
10908                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10909                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
10910                         <link field="fieldset_group" reltype="has_a" key="id" map="" class="afsg"/>
10911                 </links>
10912                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10913                         <actions>
10914                                 <create permission="CREATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10915                                 <retrieve permission="RETRIEVE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10916                                 <update permission="UPDATE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10917                                 <delete permission="DELETE_FIELDSET ADMIN_FIELDSET" context_field="owning_lib" owning_user="owner"/>
10918                         </actions>
10919                 </permacrud>
10920         </class>
10921
10922         <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">
10923                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
10924                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
10925                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
10926                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
10927                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
10928                 </fields>
10929                 <links>
10930                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
10931                 </links>
10932                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <!-- NOTE: foreign context does not support owning_user today -->
10933                         <actions>
10934                                 <create permission="CREATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10935                     <context link="fieldset" field="owning_lib"/>
10936                 </create>
10937                                 <retrieve permission="RETRIEVE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10938                     <context link="fieldset" field="owning_lib"/>
10939                 </retrieve>
10940                                 <update permission="UPDATE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10941                     <context link="fieldset" field="owning_lib"/>
10942                 </update>
10943                                 <delete permission="DELETE_FIELDSET_ENTRY ADMIN_FIELDSET_ENTRY">
10944                     <context link="fieldset" field="owning_lib"/>
10945                 </delete>
10946                         </actions>
10947                 </permacrud>
10948         </class>
10949
10950     <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">
10951         <fields>
10952             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10953             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10954             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10955         </fields>
10956                 <links>
10957                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10958                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10959                 </links>
10960     </class>
10961
10962     <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">
10963         <fields>
10964             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10965             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
10966         </fields>
10967                 <links>
10968                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10969                 </links>
10970     </class>
10971
10972     <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">
10973         <fields>
10974             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10975             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
10976             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
10977         </fields>
10978                 <links>
10979                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10980                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10981                 </links>
10982     </class>
10983
10984     <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">
10985         <fields>
10986             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
10987             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
10988         </fields>
10989                 <links>
10990                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
10991                 </links>
10992     </class>
10993
10994     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
10995                 <oils_persist:source_definition><![CDATA[
10996
10997             SELECT  DISTINCT l.*
10998               FROM  action.unfulfilled_hold_loops l
10999                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
11000               WHERE l.count = m.max
11001
11002                 ]]></oils_persist:source_definition>
11003         <fields>
11004             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
11005             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
11006             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
11007         </fields>
11008                 <links>
11009                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
11010                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11011                 </links>
11012     </class>
11013
11014         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
11015                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
11016                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
11017                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
11018                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
11019                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
11020                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
11021                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
11022                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
11023                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
11024                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
11025                 </fields>
11026                 <links>
11027                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
11028                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
11029                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
11030                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
11031                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
11032                 </links>
11033         </class>
11034
11035         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
11036                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
11037                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
11038                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
11039                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11040                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
11041                 </fields>
11042                 <links>
11043                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
11044                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
11045                 </links>
11046         </class>
11047
11048         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
11049                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
11050                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
11051                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
11052                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
11053                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
11054                 </fields>
11055                 <links>
11056                 </links>
11057         </class>
11058
11059         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
11060                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
11061                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
11062                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
11063                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11064                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
11065                 </fields>
11066                 <links>
11067                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
11068                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
11069                 </links>
11070         </class>
11071         
11072         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
11073                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
11074                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
11075                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
11076                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
11077                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
11078                 </fields>
11079                 <links>
11080                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
11081                 </links>
11082         </class>
11083         
11084         <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">
11085                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
11086                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
11087                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11088                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11089                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
11090                 </fields>
11091                 <links>
11092                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11093                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
11094                 </links>
11095         </class>
11096
11097         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
11098                 <fields oils_persist:primary="name">
11099                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
11100                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
11101                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
11102                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
11103                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
11104                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
11105                 </fields>
11106                 <links>
11107                 </links>
11108         </class>
11109
11110         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
11111                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11112                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11113                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
11114                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11115                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11116                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11117                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11118                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11119                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11120                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11121                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11122                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11123                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11124                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11125                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11126                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11127                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11128                 </fields>
11129                 <links>
11130                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11131                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11132                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11133                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11134                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11135                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11136                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11137                 </links>
11138         </class>
11139
11140         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
11141                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
11142                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
11143                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11144                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11145                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
11146                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
11147                 </fields>
11148                 <links>
11149                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11150                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
11151                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
11152                 </links>
11153         </class>
11154
11155         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
11156                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
11157                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
11158                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
11159                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
11160                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
11161                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
11162                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
11163                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11164                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
11165                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11166                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
11167                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
11168                 </fields>
11169                 <links>
11170                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11171                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
11172                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
11173                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
11174                 </links>
11175         </class>
11176
11177         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
11178                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
11179                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
11180                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
11181                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11182                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11183                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
11184                 </fields>
11185                 <links>
11186                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
11187                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
11188                 </links>
11189         </class>
11190
11191         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
11192                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
11193                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
11194                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11195                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11196                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11197                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
11198                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
11199                 </fields>
11200                 <links>
11201                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11202                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11203                 </links>
11204         </class>
11205
11206         <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">
11207                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
11208                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
11209                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
11210                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11211                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
11212                 </fields>
11213                 <links>
11214                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
11215                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
11216                 </links>
11217         </class>
11218
11219         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
11220                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11221                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11222                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11223                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11224                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11225                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11226                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11227                 </fields>
11228                 <links>
11229                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11230                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11231                 </links>
11232         </class>
11233
11234         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
11235                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11236                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11237                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11238                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11239                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11240                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
11241                 </fields>
11242                 <links>
11243                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11244                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
11245                 </links>
11246         </class>
11247
11248         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
11249                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11250                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11251                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11252                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11253                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11254                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11255                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11256                 </fields>
11257                 <links>
11258                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11259                 </links>
11260         </class>
11261
11262         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
11263                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11264                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11265                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11266                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11267                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11268                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11269                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11270                 </fields>
11271                 <links>
11272                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11273                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11274                 </links>
11275         </class>
11276
11277         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
11278                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11279                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11280                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11281                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11282                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11283                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11284                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
11285                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11286                 </fields>
11287                 <links>
11288                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11289                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11290                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
11291                 </links>
11292         </class>
11293
11294         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
11295                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11296                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11297                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11298                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11299                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11300                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
11301                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11302                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11303                 </fields>
11304                 <links>
11305                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11306                 </links>
11307         </class>
11308
11309         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
11310                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11311                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11312                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11313                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11314                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11315                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11316                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11317                 </fields>
11318                 <links>
11319                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11320                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11321                 </links>
11322         </class>
11323
11324         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
11325                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11326                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11327                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11328                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11329                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11330                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
11331                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
11332                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11333                 </fields>
11334                 <links>
11335                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11336                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
11337                 </links>
11338         </class>
11339
11340         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
11341                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11342                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11343                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11344                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11345                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11346                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11347                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11348                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11349                 </fields>
11350                 <links>
11351                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11352                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11353                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11354                 </links>
11355         </class>
11356
11357         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
11358                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11359                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11360                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11361                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11362                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11363                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11364                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11365                 </fields>
11366                 <links>
11367                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11368                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11369                 </links>
11370         </class>
11371
11372         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
11373                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11374                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11375                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11376                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11377                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11378                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11379                 </fields>
11380                 <links>
11381                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11382                 </links>
11383         </class>
11384
11385         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
11386                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11387                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11388                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11389                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11390                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11391                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11392                 </fields>
11393                 <links>
11394                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11395                 </links>
11396         </class>
11397
11398         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
11399                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11400                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11401                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11402                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11403                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11404                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
11405                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11406                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
11407                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11408                 </fields>
11409                 <links>
11410                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11411                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
11412                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
11413                 </links>
11414         </class>
11415
11416         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
11417                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11418                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11419                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11420                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11421                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11422                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
11423                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
11424                 </fields>
11425                 <links>
11426                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11427                 </links>
11428         </class>
11429
11430         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
11431                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11432                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11433                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11434                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11435                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11436                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
11437                 </fields>
11438                 <links>
11439                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11440                 </links>
11441         </class>
11442
11443         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
11444                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
11445                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
11446                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
11447                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
11448                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
11449                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
11450                 </fields>
11451                 <links>
11452                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
11453                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
11454                 </links>
11455         </class>
11456
11457         <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">
11458                 <fields oils_persist:primary="id">
11459                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
11460                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
11461                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
11462                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
11463                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
11464                 </fields>
11465                 <links>
11466                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
11467                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11468                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
11469                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
11470                 </links>
11471         </class>
11472
11473         <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">
11474                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
11475                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11476                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
11477                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11478                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
11479                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11480                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11481                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
11482                 </fields>
11483                 <links/>
11484                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11485                         <actions>
11486                                 <retrieve/>
11487                         </actions>
11488                 </permacrud>
11489         </class>
11490
11491         <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">
11492                 <fields oils_persist:primary="ptype_key">
11493                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
11494                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11495                 </fields>
11496                 <links/>
11497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11498                         <actions>
11499                                 <retrieve/>
11500                         </actions>
11501                 </permacrud>
11502         </class>
11503
11504         <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">
11505                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
11506                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11507                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
11508                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11509                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
11510                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11511                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11512                 </fields>
11513                 <links>
11514                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
11515                 </links>
11516                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11517                         <actions>
11518                                 <retrieve/>
11519                         </actions>
11520                 </permacrud>
11521         </class>
11522
11523         <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">
11524                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
11525                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11526                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
11527                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
11528                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
11529                 </fields>
11530                 <links>
11531                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
11532                 </links>
11533                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11534                         <actions>
11535                                 <retrieve/>
11536                         </actions>
11537                 </permacrud>
11538         </class>
11539
11540     <class
11541         id="uvs"
11542         controller="open-ils.cstore open-ils.pcrud"
11543         oils_obj:fieldmapper="url_verify::session"
11544         oils_persist:tablename="url_verify.session"
11545         reporter:label="URL Verification Session"
11546     >
11547         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
11548             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
11549             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
11550                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
11551             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
11552             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
11553             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11554             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
11555             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
11556             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
11557         </fields>
11558
11559         <links>
11560             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11561             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11562             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
11563             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
11564             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
11565         </links>
11566
11567         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11568             <actions>
11569                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
11570             </actions>
11571         </permacrud>
11572
11573     </class>
11574
11575     <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">
11576         <oils_persist:source_definition><![CDATA[
11577             SELECT
11578                 cbrebi.id AS id,  -- so we can have a pkey in our view
11579                 uvs.id AS session,
11580                 uvs.owning_lib,
11581                 cbrebi.target_biblio_record_entry
11582             FROM url_verify.session uvs
11583             JOIN container.biblio_record_entry_bucket cbreb
11584                 ON (uvs.container = cbreb.id)
11585             JOIN container.biblio_record_entry_bucket_item cbrebi
11586                 ON (cbrebi.bucket = cbreb.id)
11587         ]]></oils_persist:source_definition>
11588         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
11589             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
11590             <field reporter:label="Session" name="session" reporter:datatype="link" />
11591             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
11592             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
11593         </fields>
11594         <links>
11595             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
11596             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
11597             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
11598         </links>
11599         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11600             <actions>
11601                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
11602             </actions>
11603         </permacrud>
11604     </class>
11605
11606     <class
11607         id="uvus"
11608         controller="open-ils.cstore open-ils.pcrud"
11609         oils_obj:fieldmapper="url_verify::url_selector"
11610         oils_persist:tablename="url_verify.url_selector"
11611         reporter:label="URL Verification URL Selector"
11612     >
11613         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
11614             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
11615             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
11616                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11617             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
11618         </fields>
11619
11620         <links>
11621             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11622             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
11623         </links>
11624
11625         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11626             <actions>
11627                 <create permission="URL_VERIFY">
11628                     <context link="session" field="owning_lib"/>
11629                 </create>
11630                 <retrieve permission="URL_VERIFY">
11631                     <context link="session" field="owning_lib"/>
11632                 </retrieve>
11633                 <update permission="URL_VERIFY">
11634                     <context link="session" field="owning_lib"/>
11635                 </update>
11636                 <delete permission="URL_VERIFY">
11637                     <context link="session" field="owning_lib"/>
11638                 </delete>
11639             </actions>
11640         </permacrud>
11641
11642     </class>
11643
11644     <class
11645         id="uvu"
11646         controller="open-ils.cstore open-ils.pcrud"
11647         oils_obj:fieldmapper="url_verify::url"
11648         oils_persist:tablename="url_verify.url"
11649         reporter:label="URL Verification URL"
11650     >
11651         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
11652             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
11653                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
11654                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
11655                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
11656                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
11657             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
11658             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
11659             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
11660             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
11661             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
11662             <field reporter:label="Host" name="host" reporter:datatype="text"/>
11663             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
11664             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
11665             <field reporter:label="Path" name="path" reporter:datatype="text"/>
11666             <field reporter:label="Page" name="page" reporter:datatype="text"/>
11667             <field reporter:label="Query" name="query" reporter:datatype="text"/>
11668             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
11669             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
11670         </fields>
11671
11672         <links>
11673             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
11674             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
11675             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11676             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
11677             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
11678         </links>
11679
11680         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11681             <actions>
11682                 <create permission="URL_VERIFY">
11683                     <context link="session" field="owning_lib"/>
11684                 </create>
11685                 <retrieve permission="URL_VERIFY">
11686                     <context link="session" field="owning_lib"/>
11687                 </retrieve>
11688                 <update permission="URL_VERIFY">
11689                     <context link="session" field="owning_lib"/>
11690                 </update>
11691                 <delete permission="URL_VERIFY">
11692                     <context link="session" field="owning_lib"/>
11693                 </delete>
11694             </actions>
11695         </permacrud>
11696
11697     </class>
11698
11699     <class
11700         id="uvva"
11701         controller="open-ils.cstore open-ils.pcrud"
11702         oils_obj:fieldmapper="url_verify::verification_attempt"
11703         oils_persist:tablename="url_verify.verification_attempt"
11704         reporter:label="URL Verification Attempt"
11705     >
11706         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
11707             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
11708                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
11709                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
11710             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
11711             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
11712         </fields>
11713
11714         <links>
11715             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
11716             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11717         </links>
11718
11719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11720             <actions>
11721                 <create permission="URL_VERIFY">
11722                     <context link="session" field="owning_lib"/>
11723                 </create>
11724                 <retrieve permission="URL_VERIFY">
11725                     <context link="session" field="owning_lib"/>
11726                 </retrieve>
11727                 <update permission="URL_VERIFY">
11728                     <context link="session" field="owning_lib"/>
11729                 </update>
11730                 <delete permission="URL_VERIFY">
11731                     <context link="session" field="owning_lib"/>
11732                 </delete>
11733             </actions>
11734         </permacrud>
11735
11736     </class>
11737
11738     <class
11739         id="uvuv"
11740         controller="open-ils.cstore open-ils.pcrud"
11741         oils_obj:fieldmapper="url_verify::url_verification"
11742         oils_persist:tablename="url_verify.url_verification"
11743         reporter:label="URL Verification"
11744     >
11745         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
11746             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
11747                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
11748                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
11749             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
11750             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
11751             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
11752             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
11753                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
11754         </fields>
11755
11756         <links>
11757             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
11758             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
11759             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
11760         </links>
11761
11762         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11763             <actions>
11764                 <create permission="URL_VERIFY">
11765                     <context link="attempt" jump="session" field="owning_lib"/>
11766                 </create>
11767                 <retrieve permission="URL_VERIFY">
11768                     <context link="attempt" jump="session" field="owning_lib"/>
11769                 </retrieve>
11770                 <update permission="URL_VERIFY">
11771                     <context link="attempt" jump="session" field="owning_lib"/>
11772                 </update>
11773                 <delete permission="URL_VERIFY">
11774                     <context link="attempt" jump="session" field="owning_lib"/>
11775                 </delete>
11776             </actions>
11777         </permacrud>
11778
11779     </class>
11780
11781         <class
11782                 id="cfdi"
11783                 controller="open-ils.cstore open-ils.pcrud"
11784                 oils_obj:fieldmapper="config::filter_dialog_interface"
11785                 oils_persist:tablename="config.filter_dialog_interface"
11786                 reporter:label="FilterDialog Interface">
11787                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
11788                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
11789                         <field reporter:label="Description" name="description" reporter:datatype="text" />
11790                 </fields>
11791                 <links>
11792                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
11793                 </links>
11794                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11795                         <actions>
11796                                 <retrieve />
11797                         </actions>
11798                 </permacrud>
11799         </class>
11800
11801         <class
11802                 id="cfdfs"
11803                 controller="open-ils.cstore open-ils.pcrud"
11804                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
11805                 oils_persist:tablename="config.filter_dialog_filter_set"
11806                 reporter:label="FilterDialog Filter Set">
11807                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
11808                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11809                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11810                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11811                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11812                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
11813                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
11814                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
11815                 </fields>
11816                 <links>
11817                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11818                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11819                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
11820                 </links>
11821                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11822                         <actions>
11823                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11824                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11825                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11826                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
11827                         </actions>
11828                 </permacrud>
11829
11830         </class>
11831
11832         <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">
11833                 <fields oils_persist:primary="code">
11834                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
11835                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
11836                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
11837                 </fields>
11838                 <links/>
11839                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11840                         <actions>
11841                                 <retrieve/>
11842                         </actions>
11843                 </permacrud>
11844         </class>
11845
11846         <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">
11847                 <oils_persist:source_definition><![CDATA[
11848
11849             SELECT  b.id,
11850                     MAX(dcp.edit_date) AS last_delete_date
11851              FROM   biblio.record_entry b
11852                     JOIN asset.call_number cn ON (cn.record = b.id)
11853                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
11854              WHERE  NOT b.deleted
11855              GROUP BY b.id
11856              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
11857
11858                 ]]></oils_persist:source_definition>
11859                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11860                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11861                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
11862                 </fields>
11863                 <links>
11864                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11865                 </links>
11866                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11867                         <actions>
11868                                 <retrieve/>
11869                         </actions>
11870                 </permacrud>
11871         </class>
11872
11873         <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">
11874                 <oils_persist:source_definition><![CDATA[
11875
11876             -- -- 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.
11877             -- -- 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
11878             -- -- may not.
11879             -- SELECT
11880             --     bre.id AS bib_id,
11881             --     COALESCE( z.copy_count, 0 ) AS copy_count,
11882             --     COALESCE( z.hold_count, 0 ) AS hold_count,
11883             --     COALESCE( z.copy_hold_ratio, 0 ) AS hold_copy_ratio
11884             -- FROM (
11885                 SELECT
11886                     y.bre AS id,
11887                     COALESCE( x.copy_count, 0 ) AS copy_count,
11888                     y.hold_count AS hold_count,
11889                     (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
11890                 FROM (
11891                         SELECT
11892                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS bre,
11893                             COUNT(*) AS hold_count
11894                         FROM action.hold_request h
11895                         WHERE
11896                             cancel_time IS NULL
11897                             AND fulfillment_time IS NULL
11898                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
11899                         GROUP BY 1
11900                     )y LEFT JOIN (
11901                         SELECT 
11902                             (SELECT id
11903                                 FROM biblio.record_entry 
11904                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
11905                             ) AS bre, 
11906                             COUNT(*) AS copy_count
11907                         FROM asset.copy
11908                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
11909                         WHERE copy.holdable 
11910                             AND NOT copy.deleted 
11911                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
11912                         GROUP BY 1
11913                     )x ON x.bre = y.bre
11914                 -- )z RIGHT JOIN (
11915                 --     SELECT id
11916                 --     FROM biblio.record_entry
11917                 --     WHERE NOT deleted
11918                 -- )bre ON (z.bib_id = bre.id)
11919                 
11920
11921                 ]]></oils_persist:source_definition>
11922                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11923                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
11924                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
11925                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
11926                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
11927                 </fields>
11928                 <links>
11929                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11930                 </links>
11931                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11932                         <actions>
11933                                 <retrieve/>
11934                         </actions>
11935                 </permacrud>
11936         </class>
11937
11938         <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">
11939                 <oils_persist:source_definition><![CDATA[
11940             SELECT *,
11941                 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,
11942                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
11943             FROM
11944                 (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
11945                     FROM
11946                         action.hold_request ahr
11947                         JOIN reporter.hold_request_record rhrr USING (id)
11948                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11949                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
11950                     WHERE
11951                         ahr.cancel_time IS NULL
11952                         AND ahr.fulfillment_time IS NULL
11953                     GROUP BY bib_record, pickup_lib
11954                 )x
11955                 JOIN
11956                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
11957                     FROM
11958                         action.hold_request ahr
11959                         JOIN reporter.hold_request_record rhrr USING (id)
11960                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
11961                     WHERE
11962                         ahr.cancel_time IS NULL
11963                         AND ahr.fulfillment_time IS NULL
11964                     GROUP BY bib_record
11965                 )y
11966                 USING (id)
11967                 ]]></oils_persist:source_definition>
11968                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
11969                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
11970                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
11971                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
11972                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
11973                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
11974                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
11975                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
11976                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
11977                 </fields>
11978                 <links>
11979                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
11980                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
11981                 </links>
11982                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11983                         <actions>
11984                                 <retrieve/>
11985                         </actions>
11986                 </permacrud>
11987         </class>
11988
11989         <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) ">
11990                 <oils_persist:source_definition><![CDATA[
11991             WITH counts_at_ou AS (
11992                 SELECT  rhrr.bib_record AS id,
11993                         aou.id AS pickup_lib_or_desc,
11994                         COUNT(DISTINCT ahr.id) AS holds_at_or_below,
11995                         COALESCE(COUNT(DISTINCT ac.id),0) AS copy_count_at_or_below
11996                   FROM  actor.org_unit aou
11997                         JOIN actor.org_unit_type aout ON (aou.ou_type = aout.id),
11998                         action.hold_request ahr
11999                         JOIN reporter.hold_request_record rhrr USING (id)
12000                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12001                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id)
12002                   WHERE ahr.cancel_time IS NULL AND ahr.fulfillment_time IS NULL
12003                         AND ac.circ_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))
12004                         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
12005                   GROUP BY 1, 2
12006             )
12007             SELECT x.id, x.pickup_lib_or_desc, x.holds_at_or_below, x.copy_count_at_or_below,
12008                    y.holds_everywhere, y.copy_count_everywhere,
12009                 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,
12010                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE y.holds_everywhere::FLOAT/y.copy_count_everywhere END AS everywhere_ratio
12011             FROM counts_at_ou x
12012                 JOIN (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
12013                     FROM
12014                         action.hold_request ahr
12015                         JOIN reporter.hold_request_record rhrr USING (id)
12016                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
12017                     WHERE
12018                         ahr.cancel_time IS NULL
12019                         AND ahr.fulfillment_time IS NULL
12020                     GROUP BY bib_record
12021                 )y
12022                 USING (id)
12023                 ]]></oils_persist:source_definition>
12024                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12025                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
12026                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
12027                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
12028                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
12029                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
12030                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
12031                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
12032                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
12033                 </fields>
12034                 <links>
12035                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
12036                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
12037                 </links>
12038                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12039                         <actions>
12040                                 <retrieve/>
12041                         </actions>
12042                 </permacrud>
12043         </class>
12044
12045         <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">
12046                 <oils_persist:source_definition><![CDATA[
12047             SELECT
12048                 ac.id,
12049                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
12050                 MAX(actac.xact_start) AS last_circ
12051             FROM asset.copy ac
12052                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12053             GROUP BY ac.id
12054
12055             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
12056             --SELECT
12057             --    ac.id,
12058             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
12059             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
12060             --FROM asset.copy ac
12061             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
12062             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
12063             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
12064                 ]]></oils_persist:source_definition>
12065                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
12066                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
12067                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
12068                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
12069                 </fields>
12070                 <links>
12071                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12072                 </links>
12073                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12074                         <actions>
12075                                 <retrieve/>
12076                         </actions>
12077                 </permacrud>
12078         </class>
12079
12080         <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">
12081                 <fields oils_persist:primary="id">
12082                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
12083                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
12084                 </fields>
12085                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12086                         <actions>
12087                                 <retrieve/>
12088                         </actions>
12089                 </permacrud>
12090         </class>
12091
12092         <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">
12093                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
12094                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12095                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
12096                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12097                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12098                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12099                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12100                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12101                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
12102                 </fields>
12103                 <links>
12104                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
12105                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12106                 </links>
12107                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12108                         <actions>
12109                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12110                                 <retrieve/>
12111                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12112                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12113                         </actions>
12114                 </permacrud>
12115         </class>
12116
12117         <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">
12118                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
12119                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
12120                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
12121                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
12122                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
12123                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
12124                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
12125                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
12126                 </fields>
12127                 <links>
12128                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
12129                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
12130                 </links>
12131                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12132                         <actions>
12133                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12134                                 <retrieve/>
12135                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12136                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
12137                         </actions>
12138                 </permacrud>
12139         </class>
12140
12141
12142         <!-- ********************************************************************************************************************* -->
12143         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
12144         <!-- ********************************************************************************************************************* -->
12145         <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">
12146                 <fields oils_persist:primary="id">
12147                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
12148                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
12149                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
12150                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12151                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
12152                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
12153                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12154                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
12155                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
12156                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
12157                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
12158                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
12159                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
12160                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
12161                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12162                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
12163                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
12164                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
12165                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
12166                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
12167                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
12168                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
12169                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
12170                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
12171                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
12172                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
12173                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
12174                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
12175                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
12176                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12177                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12178                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12179                 </fields>
12180                 <links>
12181                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12182                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
12183                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
12184                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
12185                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
12186                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
12187                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
12188                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
12189                 </links>
12190         </class>
12191
12192         <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">
12193                 <fields oils_persist:primary="id">
12194                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12195                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12196                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12197                 </fields>
12198                 <links>
12199                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12200                 </links>
12201         </class>
12202
12203         <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">
12204                 <fields oils_persist:primary="id">
12205                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
12206                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
12207                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12208                 </fields>
12209                 <links>
12210                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12211                 </links>
12212         </class>
12213
12214         <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">
12215                 <fields oils_persist:primary="id">
12216                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
12217
12218                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
12219                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
12220                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
12221
12222                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
12223                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
12224                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
12225
12226                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
12227                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
12228
12229                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
12230                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
12231                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
12232
12233                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
12234                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
12235
12236                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
12237                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
12238                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
12239
12240                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
12241                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
12242                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
12243
12244                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
12245                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
12246                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
12247                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
12248
12249                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
12250                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
12251
12252                 </fields>
12253                 <links>
12254                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
12255                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12256                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
12257                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
12258                 </links>
12259         </class>
12260
12261         <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">
12262                 <oils_persist:source_definition><![CDATA[
12263
12264             SELECT
12265                 po.ordering_agency AS ordering_agency,
12266                 po.id AS purchase_order,
12267                 li.id AS lineitem,
12268                 lid.id AS lineitem_detail,
12269                 cpa.id AS claim_policy_action
12270             FROM
12271                 acq.lineitem_detail lid
12272                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
12273                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
12274                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
12275                 JOIN acq.claim_policy_action cpa ON (
12276                     cpa.claim_policy = cp.id
12277
12278                     -- we only care about claim policy actions whose claim
12279                     -- interval we'd reached or exceeded
12280                     AND (NOW() - cpa.action_interval) > po.order_date
12281
12282                     -- filter out all claim policy actions where claim events
12283                     -- have occurred on or after the action's action_interval
12284                     AND NOT EXISTS (
12285                         SELECT 1
12286                         FROM
12287                             acq.claim_event evt
12288                             JOIN acq.claim claim ON (
12289                                 claim.id = evt.claim
12290                                 AND claim.lineitem_detail = lid.id
12291                             )
12292                         WHERE
12293                             evt.event_date >= (po.order_date + cpa.action_interval)
12294                     )
12295                 )
12296             WHERE
12297                 lid.cancel_reason IS NULL
12298                 AND li.cancel_reason IS NULL -- belt/suspenders
12299                 AND po.cancel_reason IS NULL -- belt/suspenders
12300                 AND lid.recv_time IS NULL
12301                 AND po.state = 'on-order'
12302             ORDER BY 1, 2, 3, 4, 5
12303
12304                 ]]></oils_persist:source_definition>
12305                 <fields>
12306                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
12307                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
12308                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12309                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
12310                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
12311                 </fields>
12312                 <links>
12313                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
12314                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
12315                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12316                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
12317                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
12318                 </links>
12319         </class>
12320         <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">
12321                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12322                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12323                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12324                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12325                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12326                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12327                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12328                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12329                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12330                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12331                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12332                 </fields>
12333                 <links>
12334                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12335                 </links>
12336     </class>
12337         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
12338                 <oils_persist:source_definition><![CDATA[
12339             SELECT * FROM acq.lineitem_summary 
12340                                 WHERE item_count > (invoice_count + cancel_count)
12341         ]]></oils_persist:source_definition>
12342                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
12343                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
12344                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
12345                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
12346                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
12347                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
12348                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
12349                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
12350                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
12351                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
12352                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
12353                 </fields>
12354                 <links>
12355                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
12356                 </links>
12357     </class>
12358         <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">
12359                 <oils_persist:source_definition><![CDATA[
12360
12361                         SELECT  t.*
12362                           FROM  action.transit_copy t
12363                                 JOIN actor.org_unit AS s ON (t.source = s.id)
12364                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
12365                           WHERE s.parent_ou <> d.parent_ou
12366
12367                 ]]></oils_persist:source_definition>
12368                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
12369                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
12370                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
12371                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
12372                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
12373                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
12374                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
12375                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
12376                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
12377                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
12378                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
12379                         <field reporter:label="Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
12380                 </fields>
12381                 <links>
12382                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
12383                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
12384                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
12385                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
12386                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12387                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
12388                 </links>
12389         </class>
12390
12391     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
12392                 <oils_persist:source_definition><![CDATA[
12393
12394         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
12395                 SELECT
12396                         cp.id as copy,
12397                         COUNT(circ.id),
12398                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12399                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12400                 FROM
12401                         asset.copy cp
12402                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
12403                 GROUP BY 1, 3, 4
12404                 UNION ALL
12405                 SELECT
12406                         cp.id as copy,
12407                         COUNT(circ.id),
12408                         EXTRACT(YEAR FROM circ.xact_start) AS year,
12409                         (phone_renewal OR desk_renewal OR opac_renewal OR auto_renewal) as is_renewal
12410                 FROM
12411                         asset.copy cp
12412                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
12413                 GROUP BY 1, 3, 4
12414                 UNION ALL
12415                 SELECT
12416                         id as copy,
12417                         circ_count,
12418                         -1 AS year,
12419                         false as is_renewal
12420                 FROM
12421                         extend_reporter.legacy_circ_count
12422         )x GROUP BY 1, 3, 4
12423
12424                 ]]></oils_persist:source_definition>
12425         <fields>
12426             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
12427             <field reporter:label="Count" name="count" reporter:datatype="int"/>
12428             <field reporter:label="Year" name="year" reporter:datatype="int"/>
12429             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
12430         </fields>
12431                 <links>
12432                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12433                 </links>
12434                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12435                         <actions>
12436                                 <retrieve/>
12437                         </actions>
12438                 </permacrud>
12439     </class>
12440
12441         <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">
12442                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
12443                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
12444                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
12445                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
12446                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
12447                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
12448                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
12449                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
12450                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
12451                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
12452                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
12453                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
12454                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
12455                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
12456                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
12457                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
12458                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
12459                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
12460                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
12461                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
12462                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
12463                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
12464                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
12465                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
12466                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
12467                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
12468                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
12469                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
12470                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
12471                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
12472                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
12473                         <field reporter:label="Auto Renewal" name="auto_renewal" reporter:datatype="bool"/>
12474                         <field reporter:label="Remaining Auto Renewals" name="auto_renewal_remaining" reporter:datatype="int" />
12475                 </fields>
12476                 <links>
12477                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
12478                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
12479                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
12480                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
12481                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
12482                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
12483                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12484                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
12485                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
12486                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
12487                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
12488                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
12489                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
12490                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
12491                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
12492                 </links>
12493         </class>
12494
12495     <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">
12496         <fields oils_persist:primary="id">
12497             <field reporter:label="Title" name="title" reporter:datatype="text"/>
12498             <field reporter:label="Author" name="author" reporter:datatype="text"/>
12499             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
12500             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12501             <field reporter:label="Price" name="price" reporter:datatype="money"/>
12502             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
12503             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
12504             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
12505             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
12506             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
12507             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
12508             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
12509             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
12510             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
12511             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
12512             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
12513             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
12514             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
12515             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
12516             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
12517             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
12518             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
12519             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
12520             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
12521             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
12522             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
12523             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
12524             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
12525             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
12526             <field reporter:label="Status" name="status" reporter:datatype="link"/>
12527             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
12528             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
12529             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
12530             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
12531         </fields>
12532         <links>
12533             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12534             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
12535             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12536             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
12537             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
12538             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
12539             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
12540             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
12541         </links>
12542     </class>
12543
12544     <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">
12545         <fields oils_persist:primary="id">
12546             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12547             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12548             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12549             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12550         </fields>
12551         <links>
12552             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12553             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12554         </links>
12555     </class>
12556
12557     <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">
12558         <fields oils_persist:primary="owning_lib">
12559             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12560             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12561             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12562         </fields>
12563         <links>
12564             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12565         </links>
12566     </class>
12567
12568     <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">
12569         <fields oils_persist:primary="id">
12570             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12571             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12572             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12573             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12574             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12575         </fields>
12576         <links>
12577             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12578             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12579             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12580         </links>
12581     </class>
12582
12583     <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">
12584         <fields oils_persist:primary="circ_lib">
12585             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
12586             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12587             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12588             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12589         </fields>
12590         <links>
12591             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12592             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
12593         </links>
12594     </class>
12595
12596     <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">
12597         <fields oils_persist:primary="id">
12598             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
12599             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12600             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12601             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
12602             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
12603         </fields>
12604         <links>
12605             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
12606             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12607             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12608         </links>
12609     </class>
12610
12611     <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">
12612         <fields oils_persist:primary="home_ou">
12613             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
12614             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
12615             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
12616             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
12617         </fields>
12618         <links>
12619             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
12620             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
12621         </links>
12622     </class>
12623         <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">
12624                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
12625                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
12626                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
12627                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
12628                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
12629                 </fields>
12630                 <links>
12631                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12632                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
12633                 </links>
12634                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12635                         <actions>
12636                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12637                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
12638                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12639                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
12640                         </actions>
12641                 </permacrud>
12642         </class>
12643         <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">
12644                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
12645                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
12646                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
12647                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
12648                 </fields>
12649                 <links>
12650                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
12651                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
12652                         </links>
12653                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12654                 <actions>
12655                                 <create permission="ADMIN_ACQ_FUND_TAG">
12656                                         <context link="tag" field="owner"/>
12657                                 </create>
12658                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
12659                                         <context link="tag" field="owner"/>
12660                                 </retrieve>
12661                                 <update permission="ADMIN_ACQ_FUND_TAG">
12662                                         <context link="tag" field="owner"/>
12663                                 </update>
12664                                 <delete permission="ADMIN_ACQ_FUND_TAG">
12665                                         <context link="tag" field="owner"/>
12666                                 </delete>
12667                         </actions>
12668                 </permacrud>
12669         </class>
12670         <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">
12671                 <oils_persist:source_definition><![CDATA[
12672                 SELECT
12673                         poi.purchase_order AS purchase_order,
12674                         ii.invoice AS invoice,
12675                         NULL AS lineitem,
12676                         poi.id AS po_item,
12677                         NULL AS picklist
12678                 FROM
12679                         acq.po_item poi
12680                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
12681                 UNION SELECT
12682                         jub.purchase_order AS purchase_order,
12683                         ie.invoice AS invoice,
12684                         jub.id AS lineitem,
12685                         NULL AS po_item,
12686                         jub.picklist AS picklist
12687                 FROM
12688                         acq.lineitem jub
12689                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
12690                 UNION SELECT
12691                         ii.purchase_order AS purchase_order,
12692                         ii.invoice AS invoice,
12693                         NULL AS lineitem,
12694                         NULL AS po_item,
12695                         NULL AS picklist
12696                 FROM
12697                         acq.invoice_item ii
12698                 WHERE ii.po_item IS NULL
12699                 UNION SELECT
12700                         ie.purchase_order AS purchase_order,
12701                         ie.invoice AS invoice,
12702                         NULL AS lineitem,
12703                         NULL AS po_item,
12704                         NULL AS picklist
12705                 FROM
12706                         acq.invoice_entry ie
12707                 WHERE ie.lineitem IS NULL
12708                 UNION SELECT
12709                         NULL AS purchase_order,
12710                         NULL AS invoice,
12711                         jub.id AS lineitem,
12712                         NULL AS po_item,
12713                         jub.picklist AS picklist
12714                 FROM
12715                         acq.lineitem jub
12716                 WHERE jub.purchase_order IS NULL
12717                 ]]></oils_persist:source_definition>
12718                 <fields>
12719                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
12720                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
12721                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
12722                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
12723                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
12724                 </fields>
12725                 <links>
12726                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
12727                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
12728                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
12729                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
12730                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
12731                 </links>
12732         </class>
12733         <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">
12734                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
12735                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12736                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
12737                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
12738                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
12739                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
12740                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
12741                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
12742                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
12743                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
12744                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
12745                 </fields>
12746                 <links>
12747                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
12748                 </links>
12749                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12750                         <actions>
12751                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12752                                 <retrieve/>
12753                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12754                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
12755                         </actions>
12756                 </permacrud>
12757         </class>
12758
12759         <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">
12760                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
12761                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12762                         <field name="date_applied" reporter:datatype="timestamp"/>
12763                         <field name="org" reporter:datatype="org_unit"/>
12764                         <field name="original_value" reporter:datatype="text"/>
12765                         <field name="new_value" reporter:datatype="text"/>
12766                         <field name="field_name" reporter:datatype="link"/>
12767                 </fields>
12768                 <links>
12769                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
12770                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
12771                 </links>
12772                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12773                         <actions>
12774                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
12775                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
12776                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12777                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
12778                         </actions>
12779                 </permacrud>
12780         </class>
12781         <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">
12782                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12783                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12784                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12785                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12786                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12787                 </fields>
12788                 <links>
12789                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12790                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
12791                 </links>
12792         </class>
12793         <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">
12794                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
12795                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12796                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
12797                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
12798                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
12799                 </fields>
12800                 <links>
12801                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
12802                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
12803                 </links>
12804         </class>
12805         <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">
12806                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
12807                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
12808                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
12809                         <field reporter:label="Manual" name="manual" reporter:datatype="bool" oils_obj:required="true"/>
12810                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
12811                 </fields>
12812                 <links>
12813                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
12814                 </links>
12815                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12816                         <actions>
12817                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12818                                 <retrieve/>
12819                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12820                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12821                         </actions>
12822                 </permacrud>
12823         </class>
12824         <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">
12825                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
12826                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12827                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link" oils_obj:required="true"/>
12828                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link" oils_obj:required="true"/>
12829                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int" oils_obj:required="true"/>
12830                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
12831                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool" oils_obj:required="true"/>
12832                 </fields>
12833                 <links>
12834                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
12835                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
12836                 </links>
12837                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12838                         <actions>
12839                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12840                                 <retrieve/>
12841                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12842                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
12843                         </actions>
12844                 </permacrud>
12845         </class>
12846         <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">
12847                 <fields oils_persist:primary="code">
12848                         <field reporter:label="Code" name="code" reporter:selector="label" reporter:datatype="id" oils_obj:required="true"/>
12849                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_obj:required="true"/>
12850                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12851                 </fields>
12852                 <links>
12853                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12854                 </links>
12855                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12856                         <actions>
12857                                 <create permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12858                                 <retrieve/>
12859                                 <update permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12860                                 <delete permission="ADMIN_COPY_TAG_TYPES" context_field="owner"/>
12861                         </actions>
12862                 </permacrud>
12863         </class>
12864         <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">
12865                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_id_seq">
12866                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12867                         <field reporter:label="Copy Tag Type" name="tag_type" reporter:datatype="link"/>
12868                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
12869                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12870                         <field reporter:label="Staff Note" name="staff_note" reporter:datatype="text"/>
12871                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
12872                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
12873                         <field reporter:label="URL" name="url" reporter:datatype="text"/>
12874                 </fields>
12875                 <links>
12876                         <link field="tag_type" reltype="has_a" key="code" map="" class="cctt"/>
12877                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
12878                 </links>
12879                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12880                         <actions>
12881                                 <create permission="ADMIN_COPY_TAG" context_field="owner"/>
12882                                 <retrieve/>
12883                                 <update permission="ADMIN_COPY_TAG" context_field="owner"/>
12884                                 <delete permission="ADMIN_COPY_TAG" context_field="owner"/>
12885                         </actions>
12886                 </permacrud>
12887         </class>
12888         <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">
12889                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_tag_copy_map_id_seq">
12890                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
12891                         <field reporter:label="Copy" name="copy" reporter:datatype="link"/>
12892                         <field reporter:label="Tag" name="tag" reporter:datatype="link"/>
12893                 </fields>
12894                 <links>
12895                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
12896                         <link field="tag" reltype="has_a" key="id" map="" class="acpt"/>
12897                 </links>
12898                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12899                         <actions>
12900                                 <create permission="UPDATE_COPY">
12901                     <context link="copy" field="circ_lib"/>
12902                 </create>
12903                                 <retrieve/>
12904                                 <update permission="UPDATE_COPY">
12905                     <context link="copy" field="circ_lib"/>
12906                 </update>
12907                                 <delete permission="UPDATE_COPY">
12908                     <context link="copy" field="circ_lib"/>
12909                 </delete>
12910                         </actions>
12911                 </permacrud>
12912         </class>
12913         <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">
12914         <oils_persist:source_definition><![CDATA[
12915         SELECT ahcm.target_copy AS id,count(*) AS count
12916          FROM
12917          action.hold_request ahr,
12918          action.hold_copy_map ahcm
12919          WHERE
12920          ahr.cancel_time IS NULL AND
12921          ahr.fulfillment_time IS NULL AND
12922          ahr.capture_time IS NULL AND
12923          ahr.id = ahcm.hold
12924          GROUP BY ahcm.target_copy
12925         ]]></oils_persist:source_definition>
12926         <fields oils_persist:primary="id">
12927             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
12928             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
12929         </fields>
12930         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12931             <actions>
12932                <retrieve/>
12933             </actions>
12934         </permacrud>
12935         </class>
12936
12937         <class id="cwst" controller="open-ils.cstore open-ils.pcrud"
12938                 oils_obj:fieldmapper="config::workstation_setting_type" 
12939                 oils_persist:tablename="config.workstation_setting_type" 
12940                 reporter:label="Workstation Setting Type">
12941                 <fields oils_persist:primary="name">
12942                         <field name="name" reporter:datatype="text"/>
12943                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
12944                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
12945                         <field name="datatype" reporter:datatype="text"/>
12946                         <field name="fm_class" reporter:datatype="text"/>
12947                         <field name="grp" reporter:datatype="link"/>
12948                 </fields>
12949                 <links>
12950                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
12951                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
12952                 </links>
12953                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
12954                         <actions>
12955                                 <create permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12956                                 <retrieve/>
12957                                 <update permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12958                                 <delete permission="ADMIN_WORKSTATION_SETTING_TYPE" global_required="true"/>
12959                         </actions>
12960                 </permacrud>
12961         </class>
12962
12963         <!-- no pcrud access is granted for now, because it's assumed these
12964                          setting values will be applied and retrived via the API. -->
12965         <class id="awss" 
12966                 controller="open-ils.cstore"
12967                 oils_obj:fieldmapper="actor::workstation_setting" 
12968                 oils_persist:tablename="actor.workstation_setting" 
12969                 reporter:label="Workstation Setting">
12970                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_setting_id_seq">
12971                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
12972                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
12973                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
12974                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
12975                 </fields>
12976                 <links>
12977                         <link field="name" reltype="has_a" key="name" map="" class="cwst"/>
12978                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
12979                 </links>
12980         </class>
12981
12982         <class id="cht" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_type" oils_persist:tablename="config.hold_type" reporter:label="Hold Type" oils_persist:readonly="true">
12983         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_type_id_seq">
12984                 <field name="id" reporter:selector="name" reporter:datatype="id"/>
12985                 <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
12986                 <field name="hold_type"  reporter:datatype="text" oils_persist:i18n="true"/>
12987         </fields>
12988         </class>
12989
12990         <class id="cpt" controller="open-ils.cstore open-ils.pcrud"
12991                 oils_obj:fieldmapper="config::print_template" 
12992                 oils_persist:tablename="config.print_template" 
12993                 reporter:label="Print Templates">
12994                 <fields oils_persist:primary="id" oils_persist:sequence="config.print_template_id_seq">
12995                         <field name="id" reporter:datatype="id"  reporter:selector="label"/>
12996                         <field name="name" reporter:datatype="text" oils_obj:required="true"/>
12997                         <field name="label" reporter:datatype="text" oils_obj:required="true" oils_persist:i18n="true"/>
12998                         <field reporter:label="Owner" name="owner" oils_obj:required="true" reporter:datatype="link"/>
12999                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
13000                         <field reporter:label="Locale" name="locale" reporter:datatype="link"/>
13001                         <field name="content_type" reporter:datatype="text"/>
13002                         <field name="template" reporter:datatype="text" oils_obj:required="true"/>
13003                 </fields>
13004                 <links>
13005                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13006                         <link field="locale" reltype="has_a" key="id" map="" class="i18n_l"/>
13007                 </links>
13008                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13009                         <actions>
13010                                 <create permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13011                                 <retrieve permission="STAFF_LOGIN" context_field="owner"/>
13012                                 <update permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13013                                 <delete permission="ADMIN_PRINT_TEMPLATE" context_field="owner"/>
13014                         </actions>
13015                 </permacrud>
13016         </class>
13017
13018         <class id="cct" 
13019                 controller="open-ils.cstore open-ils.pcrud"
13020                 oils_obj:fieldmapper="config::carousel_type" 
13021                 oils_persist:tablename="config.carousel_type" 
13022                 reporter:label="Carousel Types">
13023                 <fields oils_persist:primary="id" oils_persist:sequence="config.carousel_type_id_seq">
13024                         <field reporter:label="Carousel Type ID" reporter:selector="name" name="id" reporter:datatype="id" />
13025                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13026                         <field reporter:label="Automatically Managed?" name="automatic" reporter:datatype="bool"/>
13027                         <field reporter:label="Filter By Age?" name="filter_by_age" reporter:datatype="bool"/>
13028                         <field reporter:label="Filter By Item Owning Library?" name="filter_by_copy_owning_lib" reporter:datatype="bool"/>
13029                         <field reporter:label="Filter By Item Location?" name="filter_by_copy_location" reporter:datatype="bool"/>
13030                 </fields>
13031                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13032                         <actions>
13033                                 <create permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13034                                 <retrieve/>
13035                                 <update permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13036                                 <delete permission="ADMIN_CAROUSEL_TYPE" global_required="true"/>
13037                         </actions>
13038                 </permacrud>
13039         </class>
13040
13041         <class id="cc" 
13042                 controller="open-ils.cstore open-ils.pcrud"
13043                 oils_obj:fieldmapper="container::carousel" 
13044                 oils_persist:tablename="container.carousel" 
13045                 reporter:label="Carousels">
13046                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_id_seq">
13047                         <field reporter:label="Carousel ID" name="id" reporter:datatype="id" reporter:selector="name"/>
13048                         <field reporter:label="Carousel Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
13049                         <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
13050                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
13051                         <field reporter:label="Bucket" name="bucket" reporter:datatype="link"/>
13052                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
13053                         <field reporter:label="Editing User" name="editor" reporter:datatype="link"/>
13054                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
13055                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
13056                         <field reporter:label="Age Limit" name="age_filter"  reporter:datatype="interval"/>
13057                         <field reporter:label="Item Libraries" name="owning_lib_filter" reporter:datatype="text" />      <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
13058                         <field reporter:label="Shelving Locations" name="copy_location_filter" reporter:datatype="text" /> <!-- ditto -->
13059                         <field reporter:label="Last Refresh Time" name="last_refresh_time" reporter:datatype="timestamp"/>
13060                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
13061                         <field reporter:label="Maximum Items" name="max_items" reporter:datatype="int" oils_obj:required="true"/>
13062                 </fields>
13063                 <links>
13064                         <link field="type" reltype="has_a" key="id" map="" class="cct"/>
13065                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
13066                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
13067                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
13068                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
13069                 </links>
13070                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13071                         <actions>
13072                                 <create permission="ADMIN_CAROUSEL" context_field="owner"/>
13073                                 <retrieve permission="ADMIN_CAROUSEL" context_field="owner"/>
13074                                 <update permission="ADMIN_CAROUSEL" context_field="owner"/>
13075                                 <delete permission="ADMIN_CAROUSEL" context_field="owner"/>
13076                         </actions>
13077                 </permacrud>
13078         </class>
13079
13080         <class id="ccou" 
13081                 controller="open-ils.cstore open-ils.pcrud"
13082                 oils_obj:fieldmapper="container::carousel_org_unit" 
13083                 oils_persist:tablename="container.carousel_org_unit" 
13084                 reporter:label="Carousels Visible at Library">
13085                 <fields oils_persist:primary="id" oils_persist:sequence="container.carousel_org_unit_id_seq">
13086                         <field reporter:label="ID" name="id" reporter:datatype="id" />
13087                         <field reporter:label="Carousel" name="carousel" reporter:datatype="link"/>
13088                         <field reporter:label="Override Name" name="override_name" reporter:datatype="text"/>
13089                         <field reporter:label="Library" name="org_unit" reporter:datatype="link"/>
13090                         <field reporter:label="Sequence Number" name="seq" reporter:datatype="int"/>
13091                 </fields>
13092                 <links>
13093                         <link field="carousel" reltype="has_a" key="id" map="" class="cc"/>
13094                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
13095                 </links>
13096                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13097                         <actions>
13098                                 <create permission="ADMIN_CAROUSEL">
13099                                     <context link="carousel" field="owner" />
13100                                 </create>
13101                                 <retrieve permission="ADMIN_CAROUSEL">
13102                                     <context link="carousel" field="owner" />
13103                                 </retrieve>
13104                                 <update permission="ADMIN_CAROUSEL">
13105                                     <context link="carousel" field="owner" />
13106                                 </update>
13107                                 <delete permission="ADMIN_CAROUSEL">
13108                                     <context link="carousel" field="owner" />
13109                                 </delete>
13110                         </actions>
13111                 </permacrud>
13112         </class>
13113
13114         <class id="cra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remoteauth_profile" oils_persist:tablename="config.remoteauth_profile" reporter:label="Remote Patron Authentication Configuration Profile">
13115                 <fields oils_persist:primary="name">
13116                         <field name="name"              reporter:datatype="text"     reporter:label="Name" oils_obj:required="true"/>
13117                         <field name="description"       reporter:datatype="text"     reporter:label="Description"/>
13118                         <field name="context_org"       reporter:datatype="org_unit" reporter:label="Context Org" oils_obj:required="true"/>
13119                         <field name="enabled"           reporter:datatype="bool"     reporter:label="Enabled"/>
13120                         <field name="perm"              reporter:datatype="link"     reporter:label="Permission Required by User" oils_obj:required="true"/>
13121                         <field name="restrict_to_org"   reporter:datatype="bool"     reporter:label="Restrict by Home Library"/>
13122                         <field name="allow_inactive"    reporter:datatype="bool"     reporter:label="Allow Inactive Users"/>
13123                         <field name="allow_expired"     reporter:datatype="bool"     reporter:label="Allow Expired Users"/>
13124                         <field name="block_list"        reporter:datatype="text"     reporter:label="Block List"/>
13125                         <field name="usr_activity_type" reporter:datatype="link"     reporter:label="User Activity Type"/>
13126                 </fields>
13127                 <links>
13128                         <link field="context_org" reltype="has_a" key="id" map="" class="aou"/>
13129                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
13130                         <link field="usr_activity_type" reltype="has_a" key="id" map="" class="cuat"/>
13131                 </links>
13132                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
13133                         <actions>
13134                                 <create permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13135                                 <retrieve permission="STAFF_LOGIN" context_field="context_org"/>
13136                                 <update permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13137                                 <delete permission="ADMIN_REMOTEAUTH" context_field="context_org"/>
13138                         </actions>
13139                 </permacrud>
13140         </class>
13141
13142         <!-- ********************************************************************************************************************* -->
13143 </IDL>
13144
13145 <!--
13146     vim:noet:ts=4:sw=4:
13147 -->